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