This commit is contained in:
2026-02-02 07:13:26 -06:00
parent b6f78e4659
commit e37c64fb1d
6 changed files with 2240 additions and 7 deletions

12
src/db/db.js Normal file
View File

@@ -0,0 +1,12 @@
import { drizzle } from "drizzle-orm/node-postgres";
import pg from 'pg'
if(!process.env.DATABASE_URL){
throw new Error('DATABASE_URL is not defined')
}
export const pool = new pg.Pool({
connectionString: process.env.DATABASE_URL
})
export const db = drizzle(pool)