Initial commit

This commit is contained in:
agent
2026-05-13 03:54:14 +00:00
commit 758e23e905
114 changed files with 13548 additions and 0 deletions

16
lib/db/src/index.ts Normal file
View File

@@ -0,0 +1,16 @@
import { drizzle } from "drizzle-orm/node-postgres";
import pg from "pg";
import * as schema from "./schema";
const { Pool } = pg;
if (!process.env.DATABASE_URL) {
throw new Error(
"DATABASE_URL must be set. Did you forget to provision a database?",
);
}
export const pool = new Pool({ connectionString: process.env.DATABASE_URL });
export const db = drizzle(pool, { schema });
export * from "./schema";