diff options
author | Cheng-Han, Wu | 2016-02-16 20:08:44 -0800 |
---|---|---|
committer | Cheng-Han, Wu | 2016-02-16 20:08:44 -0800 |
commit | b2b1be3dda406312add39997ad8bd9494f20b7f8 (patch) | |
tree | 997403359ffc0f585fa52752c399ce87287222c3 /config.js | |
parent | 3f2f063e9b6c6d36169f6acefc27df87d0bd176b (diff) |
Support set url path and use relative url, move raphael to bower and fixed minor issue in history
Diffstat (limited to 'config.js')
-rw-r--r-- | config.js | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -2,6 +2,7 @@ var path = require('path'); var domain = process.env.DOMAIN; +var urlpath = process.env.URL_PATH; var testport = '3000'; var testsslport = '3001'; var port = process.env.PORT || testport; @@ -15,6 +16,7 @@ var config = { version: '0.3.4', domain: domain, alloworigin: ['add here to allow origin to cross'], + urlpath: urlpath, testport: testport, testsslport: testsslport, port: port, @@ -24,10 +26,14 @@ var config = { sslcapath: ['change this'], usessl: usessl, getserverurl: function() { - if(usessl) - return 'https://' + domain + (sslport == 443 || !urladdport ? '' : ':' + sslport); + var url = domain; + if (usessl) + url = 'https://' + url + (sslport == 443 || !urladdport ? '' : ':' + sslport); else - return 'http://' + domain + (port == 80 || !urladdport ? '' : ':' + port); + url = 'http://' + url + (port == 80 || !urladdport ? '' : ':' + port); + if (urlpath) + url = url + '/' + urlpath; + return url; }, //path tmppath: "./tmp/", |