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