···11+import { Pool } from "pg";
22+import { attachDatabasePool } from "@vercel/functions";
33+import { DbPool } from "@vercel/functions/db-connections";
44+55+export const pool = new Pool({
66+ idleTimeoutMillis: 5000,
77+ min: 1,
88+ connectionString: process.env.DB_URL,
99+});
1010+1111+// Attach the pool to ensure idle connections close before suspension
1212+attachDatabasePool(pool as DbPool);