glowing-fiesta/shared/utils/db/index.ts
Liviu Burcusel 0add58254d
All checks were successful
Production Build and Deploy / Build (push) Successful in 1m7s
Production Build and Deploy / Deploy (push) Successful in 21s
Project import from github
2026-01-14 16:29:05 +01:00

15 lines
330 B
TypeScript

// Global database connection
import { drizzle } from "drizzle-orm/node-postgres";
import { Pool } from "pg";
import env from "../env";
import * as schema from "./schema";
const pool = new Pool({
connectionString: env.DATABASE_URL,
});
const db = drizzle({ client: pool, casing: "snake_case", schema });
export default db;