mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2024-11-10 07:11:53 +00:00
Allow storage of bot configuration
This commit is contained in:
parent
e161ddddbd
commit
b71805ffd3
1 changed files with 20 additions and 8 deletions
|
@ -8,16 +8,28 @@ var path = require("path");
|
|||
|
||||
var baseConfig = require(path.join(__dirname, path.join("environments/" + env.toLowerCase())));
|
||||
|
||||
if (!test && process.env.PORT) {
|
||||
baseConfig.port = parseInt(process.env.PORT, 10);
|
||||
}
|
||||
baseConfig.steamBot = {};
|
||||
|
||||
if (!test && process.env.MONGOLAB_URI) {
|
||||
baseConfig.mongo.uri = process.env.MONGOLAB_URI;
|
||||
}
|
||||
if (!test) {
|
||||
if (process.env.PORT) {
|
||||
baseConfig.port = parseInt(process.env.PORT, 10);
|
||||
}
|
||||
|
||||
if (!test && process.env.RAILS_SECRET) {
|
||||
baseConfig.secret_token = process.env.RAILS_SECRET;
|
||||
if (process.env.MONGOLAB_URI) {
|
||||
baseConfig.mongo.uri = process.env.MONGOLAB_URI;
|
||||
}
|
||||
|
||||
if (process.env.RAILS_SECRET) {
|
||||
baseConfig.secret_token = process.env.RAILS_SECRET;
|
||||
}
|
||||
|
||||
if (process.env.GATHER_STEAM_ACCOUNT) {
|
||||
baseConfig.steamBot.account_name = process.env.GATHER_STEAM_ACCOUNT;
|
||||
}
|
||||
|
||||
if (process.env.GATHER_STEAM_PASSWORD) {
|
||||
baseConfig.steamBot.password = process.env.GATHER_STEAM_PASSWORD;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = baseConfig;
|
||||
|
|
Loading…
Reference in a new issue