feat(api): integrate Prisma client with /db/health endpoint
- Add @ketopath/db and fastify-plugin to apps/api - prismaPlugin decorates the Fastify instance with prisma and disconnects on app close, with FastifyInstance type augmented in src/types/fastify.d.ts - DATABASE_URL is now required by env validation - New module modules/db with GET /db/health running SELECT 1 via Prisma - dev script switched to tsx --env-file=.env for env loading Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
d309d06970
commit
72d47da453
8 files changed
+40
-3
No files matched your search
@@ -6,5 +6,4 @@ LOG_LEVEL=info
|
||||
# CORS — origini consentite (separate da virgola)
|
||||
CORS_ORIGINS=http://localhost:3000
|
||||
|
||||
# Database (configurato in step successivo con Prisma)
|
||||
# DATABASE_URL=postgresql://user:password@localhost:5432/ketopath
|
||||
DATABASE_URL=postgresql://luciano:luciano%40@localhost:5432/ketopath?schema=public
|
||||
Reference in new issue
Block a user