Ändra din anslutningskod för att använda ssl. Följer ditt länkade exempel:
var conString = "pg://admin:[email protected]:5432/Employees";
var client = new pg.Client(conString);
client.connect();
blir:
var client = new pg.Client({
user: "admin",
password: "guest",
database: "Employees",
port: 5432,
host: "localhost",
ssl: true
});
client.connect();
https://github.com/brianc/ node-postgres/wiki/Client#new-clientobject-config--client