Skip to content

Commit

Permalink
changed to secrets.json
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Nov 21, 2013
1 parent 14ee6f2 commit add0235
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ results

npm-debug.log
node_modules
secrets.json
11 changes: 3 additions & 8 deletions db/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@ var mongoose = require('mongoose');
var keys = require('keys');
var mongo_url;

console.log("ENV", process.env.NODE_ENV);

if (process.env.NODE_ENV) {
mongo_url = 'mongodb://' + keys.mongo_user + ':' + 'keys.mongo_password' + "@SOMEURL:PORT/livebots"
} else {
mongo_url = 'mongodb://localhost/livebots_dev';
}

// BEFORE DEPLOY MAKE SURE YOU ARE USING THE REMOTE DB
mongo_url = 'mongodb://' + keys.mongo_user + ':' + 'keys.mongo_password' + "@SOMEURL:PORT/livebots"
// mongo_url = 'mongodb://localhost/livebots_dev';

require('./models/bots');
require('./models/commands');
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
"bunyan": "~0.22.0",
"async": "~0.2.9",
"mongoose": "~3.8.0",
"joi": "~2.0.3",
"keys": "git+ssh://[email protected]:diasdavid/keys.livebots.cc.git"
"joi": "~2.0.3"
},
"devDependencies": {
"nodemon": "~0.7.10"
Expand Down

0 comments on commit add0235

Please sign in to comment.