- Add drizzle.config.ts with PostgreSQL dialect configuration - Create lib/db/index.ts with Drizzle ORM client and pg Pool - Add db:generate, db:migrate, db:studio, db:push scripts to package.json Part of Chunk 1: Drizzle Config & DB Client setup
10 lines
232 B
TypeScript
10 lines
232 B
TypeScript
import { drizzle } from "drizzle-orm/node-postgres"
|
|
import { Pool } from "pg"
|
|
import * as schema from "./schema"
|
|
|
|
const pool = new Pool({
|
|
connectionString: process.env.DATABASE_URL,
|
|
})
|
|
|
|
export const db = drizzle(pool, { schema })
|