I am not able to create connections using Node 6.7.0 and libpq 1.8.5. Both connect() and connectSync() have no return value when the connection is successful (on libpq's side). Passing invalid parameters to the functions will result in an error and the error object is passed to my code as it should, but otherwise there is no value passed.
let Libpq = require("libpq");
let pq = new Libpq;
pq.connect("postgresql://localhost/mydb", (...args) => {
console.log(args.length); // outputs '0'
});
let client = pq.connectSync("postgresql://localhost/mydb");
console.log(client); // outputs 'undefined'
I am not able to create connections using Node 6.7.0 and libpq 1.8.5. Both connect() and connectSync() have no return value when the connection is successful (on libpq's side). Passing invalid parameters to the functions will result in an error and the error object is passed to my code as it should, but otherwise there is no value passed.