Skip to content

Commit

Permalink
Added support for process.env.DATABASE_URL as used by heroku
Browse files Browse the repository at this point in the history
  • Loading branch information
garth committed Nov 16, 2012
1 parent 7e4e324 commit a554f5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/driver/pg.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,6 @@ var PgDriver = Base.extend({
});

exports.connect = function(config, callback) {
var db = config.db || new pg.Client(config);
var db = config.db || new pg.Client(process.env.DATABASE_URL || config);
callback(null, new PgDriver(db));
};

0 comments on commit a554f5e

Please sign in to comment.