Add embedded PGlite support as zero-config database option
Add @electric-sql/pglite so the server can run without an external Postgres instance. When DATABASE_URL is not set, the server auto-creates an embedded PGlite database in ./data/pglite with schema push on startup. - Add createPgliteDb() alongside the existing createDb() - Make DATABASE_URL optional in server config - Update drizzle config to glob schema files - Update migrate script to support both Postgres and PGlite - Add data/ to .gitignore for local PGlite storage Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -14,12 +14,13 @@
|
||||
"seed": "tsx src/seed.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@electric-sql/pglite": "^0.3.15",
|
||||
"@paperclip/shared": "workspace:*",
|
||||
"drizzle-orm": "^0.38.4",
|
||||
"postgres": "^3.4.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"drizzle-kit": "^0.30.4",
|
||||
"drizzle-kit": "^0.31.9",
|
||||
"tsx": "^4.19.2",
|
||||
"typescript": "^5.7.3",
|
||||
"vitest": "^3.0.5"
|
||||
|
||||
Reference in New Issue
Block a user