-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathconfig.server.js
33 lines (26 loc) · 1.01 KB
/
config.server.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//////////////////////////////////////////////////////
// DO NOT CHANGE THIS FILE IT MAY BREAK THE APP!
//////////////////////////////////////////////////////
// AENDERUNGEN AN DIESER DATEI KOENNEN DAZU FUEHREN
// DASS DIE APP NICHT MEHR KORREKT FUNKTIONIERT!
//////////////////////////////////////////////////////
const logger = require('./server/lib/logger')
, version = require('./server/lib/version.js')()
require('dotenv').config()
var config = {};
var errored = false;
config.WEB_PORT = process.env.WEB_PORT;
config.SERVER_IP = process.env.SERVER_IP;
config.SERVER_KEY = process.env.SERVER_KEY;
config.DEFAULT_LANGUAGE = process.env.DEFAULT_LANGUAGE;
// put required parameters befor this check to ensure they are checked
for (const [k,v] of Object.entries(config)){
if (v == "" || typeof v == 'undefined'){
logger.error(k+" missing! Please check configuration!");
errored = true;
}
}
if (errored) process.exit();
config.VERSION = version;
config.SUPPORTED_LANGUAGES = ['en','de','cz'];
module.exports = config;