summaryrefslogtreecommitdiffstats
path: root/server/bin
diff options
context:
space:
mode:
authorJannik Schönartz2018-08-08 22:41:01 +0200
committerJannik Schönartz2018-08-08 22:41:01 +0200
commitca7f92e309744292ce8bd0c2312c63a1c16fa0e6 (patch)
tree5496bf5c313e444a2054ab96ad32becf2cf3fd44 /server/bin
parent[server/database] Delete old database lib (diff)
downloadbas-ca7f92e309744292ce8bd0c2312c63a1c16fa0e6.tar.gz
bas-ca7f92e309744292ce8bd0c2312c63a1c16fa0e6.tar.xz
bas-ca7f92e309744292ce8bd0c2312c63a1c16fa0e6.zip
[server/config] Add server configs.
Add config with tftp and https details. Use config port > ENV Variables port > default port.
Diffstat (limited to 'server/bin')
-rwxr-xr-xserver/bin/www6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/bin/www b/server/bin/www
index 512fe54..3618506 100755
--- a/server/bin/www
+++ b/server/bin/www
@@ -10,11 +10,15 @@ var debug = require('debug')('bas:server')
var https = require('https')
var fs = require('fs')
+/* global __appdir */
+var path = require('path')
+var config = require(path.join(__appdir, 'config', 'config')).https
+
/**
* Get port from environment and store in Express.
*/
-var port = normalizePort(process.env.PORT || '3000')
+var port = normalizePort(config.port || process.env.PORT || '3000')
app.set('port', port)
/**