Skip to content

Instantly share code, notes, and snippets.

@qcom
Created March 18, 2014 18:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qcom/9626932 to your computer and use it in GitHub Desktop.
Save qcom/9626932 to your computer and use it in GitHub Desktop.
var pg = require(‘pg’), connString = ‘***’;
function DB(cb) {
var that = this;
pg.connect(connString, function(err, client, done) {
if (err) return cb(err);
that.client = client;
cb(null, that);
});
}
DB.protoytpe.getUser = function(email, cb) { };
DB.prototype.getCompany = function(id, cb) { };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment