Fix pg CommonJS/ESM interop

This commit is contained in:
Sebastjan 2026-06-07 14:56:49 +02:00
parent 1eb1ef68c5
commit b3e23877cf

View File

@ -1,7 +1,9 @@
import { Pool } from "pg"; import pg from "pg";
import { drizzle } from "drizzle-orm/node-postgres"; import { drizzle } from "drizzle-orm/node-postgres";
import * as schema from "@shared/schema"; import * as schema from "@shared/schema";
const { Pool } = pg;
if (!process.env.DATABASE_URL) { if (!process.env.DATABASE_URL) {
throw new Error("DATABASE_URL must be set."); throw new Error("DATABASE_URL must be set.");
} }