Files
worldcup/lib/db/index.ts
T

11 lines
342 B
TypeScript
Raw Normal View History

import { drizzle } from 'drizzle-orm/postgres-js'
import postgres from 'postgres'
import * as schema from './schema'
const connectionString = process.env.DATABASE_URL ?? 'postgres://wc:wc@localhost:5432/worldcup'
const client = postgres(connectionString, { max: 10 })
export const db = drizzle(client, { schema })
export * from './schema'