Migrating Database

This commit is contained in:
Martin Donnelly 2016-09-30 12:01:21 +01:00
parent 64b2411333
commit c480b6b791
2 changed files with 12 additions and 2 deletions

View File

@ -27,7 +27,16 @@ var remoteCN = {
password: 'PQUYLiIW4M6r7SWyZevrES_rRAULYFkp'
};
const cn = process.env.NODE_ENV === 'production' ? remoteCN : localCN;
var amazonCN = {
dbinstance:'CensisMDot',
host: 'censis.cew5a5td5ukl.eu-west-1.rds.amazonaws.com',
port: 5432,
database: 'mdot',
user: 'censis_Lm5zt9BYD',
password: '1bR9nJoC5cFRcO84lu5mzmA7MeKyRW'
};
const cn = process.env.NODE_ENV === 'production' ? amazonCN : localCN;
exports.dbConnection = pgp(cn);

View File

@ -6,7 +6,8 @@
"private": true,
"scripts": {
"start": "node app.js",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"production": "NODE_ENV=production node app.js"
},
"dependencies": {
"atob": "^2.0.3",