summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorCheng-Han, Wu2016-04-22 03:33:09 +0800
committerCheng-Han, Wu2016-04-22 03:33:09 +0800
commitff4698caf5d8d1941255dff6df2ecc3dfd9edde3 (patch)
tree4832a0358a3274c6e3e23b449d75a2be152d1add /lib
parent13d61fe42db31878e76be3b617402e6527246990 (diff)
Update to support DOMAIN and URL_PATH environment variables
Diffstat (limited to '')
-rw-r--r--lib/config.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/config.js b/lib/config.js
index 386b0885..7028f29a 100644
--- a/lib/config.js
+++ b/lib/config.js
@@ -7,8 +7,8 @@ var config = require(path.join(__dirname, '..', 'config.json'))[env];
var debug = process.env.DEBUG ? (process.env.DEBUG === 'true') : ((typeof config.debug === 'boolean') ? config.debug : (env === 'development'));
// url
-var domain = config.domain || 'localhost';
-var urlpath = config.urlpath || '';
+var domain = process.env.DOMAIN || config.domain || '';
+var urlpath = process.env.URL_PATH || config.urlpath || '';
var port = process.env.PORT || config.port || 3000;
var alloworigin = config.alloworigin || ['localhost'];