mirror of
https://github.com/whekin/household-bot.git
synced 2026-03-31 22:04:03 +00:00
feat(WHE-27): add drizzle db package and typed env config
This commit is contained in:
12
packages/db/src/client.ts
Normal file
12
packages/db/src/client.ts
Normal 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 }
|
||||
Reference in New Issue
Block a user