feat(db): add Drizzle ORM with local SQLite storage
Configure Bun SQLite with WAL mode, foreign keys, and a shared database path for development and production. Add migration commands and startup migration handling, check database connectivity in the health endpoint, and document configuration while excluding local database files from Git.
This commit is contained in:
10
package.json
10
package.json
@@ -4,15 +4,18 @@
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "bun --hot src/index.ts",
|
||||
"start": "NODE_ENV=production bun --cwd dist index.js",
|
||||
"dev": "bun run db:migrate && bun --hot src/index.ts",
|
||||
"start": "bun run db:migrate && bun scripts/start.ts",
|
||||
"build": "bun run build.ts",
|
||||
"typecheck": "tsc --noEmit"
|
||||
"typecheck": "tsc --noEmit",
|
||||
"db:generate": "bunx --bun drizzle-kit generate",
|
||||
"db:migrate": "bun scripts/migrate.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"bun-plugin-tailwind": "^0.1.2",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
"drizzle-orm": "^0.45.2",
|
||||
"hono": "^4.13.5",
|
||||
"lucide-react": "^1",
|
||||
"react": "^19",
|
||||
@@ -25,6 +28,7 @@
|
||||
"@types/bun": "latest",
|
||||
"@types/react": "^19",
|
||||
"@types/react-dom": "^19",
|
||||
"drizzle-kit": "^0.31.10",
|
||||
"tailwindcss": "^4.1.11",
|
||||
"typescript": "^7.0.2"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user