Commit Graph

3 Commits

Author SHA1 Message Date
Kunthawat Greethong
71e05f9d2c Fix SQLite database path to match emdash init location
The emdash CLI creates the database at ./data.db relative to the
workspace root (/app/emdash/data.db), but the Astro config was
pointing to ./storage/data.db. This caused getEmDashEntry() to
return null since the database used at runtime was empty.

Change db.ts to use file:./data.db instead of file:./storage/data.db

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-04 07:33:40 +07:00
Kunthawat Greethong
557ed9e2d0 Remove mysql export that doesn't exist in patched emdash 0.9.0
The blog template's db.ts imported 'mysql' from 'emdash/db' but the
patched source only exports sqlite, libsql, and postgres adapters.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-03 11:37:01 +07:00
Kunthawat Greethong
13f775c57c Add DATABASE_URL env var support for EmDash
- Add .env.example documenting SQLite/PostgreSQL/MySQL config
- Add src/lib/db.ts with getDatabaseConfig() helper that parses
  DATABASE_URL and returns the appropriate db config
- Update astro.config.mjs to use getDatabaseConfig() instead of
  hardcoded sqlite path

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-02 16:31:43 +07:00