davidlivingrooms/OpenMicNightScraper

invalid initialization

Opened this issue · 2 comments

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);

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.

As per the steps in Getting Started. ;)