From 4dc825ef056a1d207f9a9732ff4316c3a89ea168 Mon Sep 17 00:00:00 2001 From: Chris Blanchard Date: Wed, 5 Aug 2015 01:11:46 +0100 Subject: [PATCH] Expanded config for mongo --- config/config.js | 8 ++++++++ config/environments/development.js | 6 +++++- config/environments/production.js | 6 +++++- config/environments/test.js | 6 +++++- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/config/config.js b/config/config.js index 39d1f7b..0c663e2 100644 --- a/config/config.js +++ b/config/config.js @@ -11,4 +11,12 @@ if (process.env.PORT) { baseConfig.port = parseInt(process.env.PORT, 10); } +if (process.env.MONGOLAB_URI) { + baseConfig.mongo.uri = process.env.MONGOLAB_URI; +} + +if (process.env.RAILS_SECRET) { + baseConfig.secret_token = process.env.RAILS_SECRET; +} + module.exports = baseConfig; \ No newline at end of file diff --git a/config/environments/development.js b/config/environments/development.js index 92caa70..f46b75b 100644 --- a/config/environments/development.js +++ b/config/environments/development.js @@ -1,7 +1,11 @@ "use strict"; var config = { - port: 8000 + port: 8000, + mongo: { + uri: "mongodb://localhost/swsgather_development" + }, + secret_token: "" }; module.exports = config; \ No newline at end of file diff --git a/config/environments/production.js b/config/environments/production.js index b53e048..ce05c8c 100644 --- a/config/environments/production.js +++ b/config/environments/production.js @@ -1,7 +1,11 @@ "use strict"; var config = { - port: 8080 + port: 8080, + mongo: { + uri: "" // Set using MONGOLAB_URI + }, + secret_token: "" }; module.exports = config; \ No newline at end of file diff --git a/config/environments/test.js b/config/environments/test.js index ea5ac53..6edc603 100644 --- a/config/environments/test.js +++ b/config/environments/test.js @@ -1,7 +1,11 @@ "use strict"; var config = { - port: 9000 + port: 9000, + mongo: { + uri: "mongodb://localhost/swsgather_development" + }, + secret_token: "" }; module.exports = config; \ No newline at end of file