a fun bot for the hc slack
at main 362 B view raw
1import { drizzle } from "drizzle-orm/node-postgres"; 2import { Pool } from "pg"; 3import * as schema from "./schema"; 4 5const pool = new Pool({ 6 connectionString: process.env.DATABASE_URL, 7}); 8 9export const db = drizzle(pool, { schema }); 10 11// Set up triggers when initializing the database 12schema.setupTriggers(pool).catch(console.error); 13 14export { pool, schema };