1const pgp = require('pg-promise')();
2
3// Get the values for these variables from configuration
4const user = ...
5const password = ...
6const host = ...
7const port = ...
8const database = ...
9
10const db = pgp(`postgres://${user}:${password}@${host}:${port}/${database}`)