const { Pool } = require('pg'); const debug = require('debug')('sos:pg'); const pool = new Pool({ max: 20, host: process.env.DB_HOST, user: process.env.DB_USER, database: process.env.DB_NAME, password: process.env.DB_PASS, connectionTimeoutMillis: 200 }); pool.on('error', err=>debug(err)); debug("Database ready"); module.exports = pool;