Fix pg CommonJS/ESM interop
This commit is contained in:
parent
1eb1ef68c5
commit
b3e23877cf
@ -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.");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user