invalid initialization
Opened this issue · 2 comments
vitaly-t commented
var db = pgp(connectionString);
var db = db(connectionString);
It works, just wrong semantically, because it should be:
var pgp = require('pg-promise')({
// initialization options;
});
var db = pgp(connection);
davidlivingrooms commented
Thanks @vitaly-t. One question, what does connection represent in the line below?
var db = pgp(connection);
I'm passing in the connection options into the require call you showed me but i'm not sure what connection should be or if I even need it. Thanks.
vitaly-t commented
As per the steps in Getting Started. ;)