pg-instance.js 234 B

1234567891011
  1. const pgp = require('pg-promise')();
  2. // 连接到数据库
  3. const pgClient = pgp({
  4. user: 'postgres',
  5. password: 'postgres',
  6. host: 'localhost',
  7. port: 25432,
  8. database: 'postgres'
  9. });
  10. module.exports.pgClient = pgClient