📅  最后修改于: 2022-03-11 15:01:53.306000             🧑  作者: Mango
const pgp = require('pg-promise')();
// Get the values for these variables from configuration
const user = ...
const password = ...
const host = ...
const port = ...
const database = ...
const db = pgp(`postgres://${user}:${password}@${host}:${port}/${database}`)