Skip to content

Instantly share code, notes, and snippets.

@vlucas
Created January 29, 2015 20:13
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 vlucas/09acb40ccbdd945d26ce to your computer and use it in GitHub Desktop.
Save vlucas/09acb40ccbdd945d26ce to your computer and use it in GitHub Desktop.
// PG directly
var pg = require('pg');
var client = new pg.Client(process.env.DATABASE_URL).connect();
// Node-DBI wrapper
var DBWrapper = require('node-dbi').DBWrapper;
var db = new DBWrapper('pg', {dsn: process.env.DATBASE_URL });
db.connect();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment