import { Pool, type QueryResultRow } from "pg"; const pool = new Pool({ connectionString: process.env.PG_CONNECTION_STRING, max: 10, idleTimeoutMillis: 30000, connectionTimeoutMillis: 5000, }); export async function query( text: string, params?: (string | number | boolean | null)[] ): Promise { const { rows } = await pool.query(text, params); return rows; } export default pool;