github Demo
连接数据库请求数据
const pg = require('pg');
function connectPg() {
return new Promise((resolve, reject) => {
const pgConfig = {
user: 'postgres',
database: 'postgres',
password: 'postgres',
host: '11.22.33.44',
port: '5433'
};
const pool = new pg