feat(WHE-27): add drizzle db package and typed env config

This commit is contained in:
2026-03-05 03:05:02 +04:00
parent 18168a8dab
commit 8086044938
21 changed files with 631 additions and 28 deletions

12
packages/db/src/client.ts Normal file
View File

@@ -0,0 +1,12 @@
import postgres from 'postgres'
import { drizzle } from 'drizzle-orm/postgres-js'
import { env } from '@household/config'
const queryClient = postgres(env.DATABASE_URL, {
prepare: false,
max: 5
})
export const db = drizzle(queryClient)
export { queryClient }