File size: 295 Bytes
05c5ed5
 
 
 
 
 
8f7768e
 
05c5ed5
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import { drizzle as drizzlePg } from "drizzle-orm/node-postgres";
import { Pool } from "pg";

const pool = new Pool({
  connectionString: process.env.POSTGRES_URL,
  ssl: { rejectUnauthorized: false },
  max: 3,
  idleTimeoutMillis: 300000,
});

export const pgDb = drizzlePg({ client: pool });