mdot_server/lib/server/db-connector.js

32 lines
449 B
JavaScript

'uses strict';
/**
*
* User: Martin Donnelly
* Date: 2016-03-11
* Time: 10:22
*
*/
var pgp = require('pg-promise')();
var cn = {
host: 'localhost',
port: 5432,
database: 'mdot',
user: 'postgres',
password: ''
};
// ElephantSql settings
/*var cn = {
host: 'jumbo.db.elephantsql.com',
port: 5432,
database: 'vmlcokon',
user: 'vmlcokon',
password: 'PQUYLiIW4M6r7SWyZevrES_rRAULYFkp'
};*/
exports.dbConnection = pgp(cn);