ensl_gathers/config/config.js

22 lines
480 B
JavaScript
Raw Normal View History

2015-07-20 09:41:58 +00:00
"use strict";
var env = process.env.NODE_ENV || "development";
var fs = require("fs");
var path = require("path");
var baseConfig = require(path.join(__dirname, path.join("environments/" + env)));
2015-07-22 13:58:05 +00:00
if (process.env.PORT) {
baseConfig.port = parseInt(process.env.PORT, 10);
}
2015-08-05 00:11:46 +00:00
if (process.env.MONGOLAB_URI) {
baseConfig.mongo.uri = process.env.MONGOLAB_URI;
}
if (process.env.RAILS_SECRET) {
baseConfig.secret_token = process.env.RAILS_SECRET;
}
2015-07-20 09:41:58 +00:00
module.exports = baseConfig;