mdot_server/lib/server/db-connector.js

34 lines
451 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: 'amlrxqev',
user: 'amlrxqev',
password: 'K11cvCplk0--oNafsYj4ISN-rVQmVS3y'
};
exports.dbConnection = pgp(cn);