Expanded config for mongo

This commit is contained in:
Chris Blanchard 2015-08-05 01:11:46 +01:00
parent e49f4ffa77
commit 4dc825ef05
4 changed files with 23 additions and 3 deletions

View file

@ -11,4 +11,12 @@ if (process.env.PORT) {
baseConfig.port = parseInt(process.env.PORT, 10); 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; module.exports = baseConfig;

View file

@ -1,7 +1,11 @@
"use strict"; "use strict";
var config = { var config = {
port: 8000 port: 8000,
mongo: {
uri: "mongodb://localhost/swsgather_development"
},
secret_token: ""
}; };
module.exports = config; module.exports = config;

View file

@ -1,7 +1,11 @@
"use strict"; "use strict";
var config = { var config = {
port: 8080 port: 8080,
mongo: {
uri: "" // Set using MONGOLAB_URI
},
secret_token: ""
}; };
module.exports = config; module.exports = config;

View file

@ -1,7 +1,11 @@
"use strict"; "use strict";
var config = { var config = {
port: 9000 port: 9000,
mongo: {
uri: "mongodb://localhost/swsgather_development"
},
secret_token: ""
}; };
module.exports = config; module.exports = config;