import { Pool , QueryResult } from 'pg' ; import { getConfig } from './config' ; const config = getConfig ( ) ; const pool = new Pool ( { connectionString : config . DATABASE_URL } ) ; example export const query = ( text , params ? ) : Promise < QueryResult > => { return pool . query ( text , params ) ; } ;