Files
moneymind/src/lib/db.ts
Leon van Zyl c412e6e76d Init
2025-08-11 12:38:39 +02:00

12 lines
360 B
TypeScript

import { drizzle } from "drizzle-orm/postgres-js"
import postgres from "postgres"
import * as schema from "./schema"
const connectionString = process.env.DATABASE_URL as string
if (!connectionString) {
throw new Error("DATABASE_URL environment variable is not set")
}
const client = postgres(connectionString)
export const db = drizzle(client, { schema })