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>
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>
- 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>