import pg from 'pg' const connectPostgres = async ()=>{ const { Client } = pg const postgres = new Client({ database:'lepr_stack' }) await postgres.connect() console.log('connected to pg'); return postgres } export default await connectPostgres()