From da0264f8de8bab1bdad58880c1ed663a6d2acf05 Mon Sep 17 00:00:00 2001 From: Elbandi Date: Fri, 9 May 2014 13:41:16 +0200 Subject: [PATCH] Bind website listener to host --- config_example.json | 1 + libs/website.js | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/config_example.json b/config_example.json index 7f49ad7..c473771 100644 --- a/config_example.json +++ b/config_example.json @@ -11,6 +11,7 @@ "website": { "enabled": true, + "host": "0.0.0.0", "port": 80, "stratumHost": "cryppit.com", "stats": { diff --git a/libs/website.js b/libs/website.js index 1b246be..4156d1f 100644 --- a/libs/website.js +++ b/libs/website.js @@ -275,12 +275,12 @@ module.exports = function(logger){ }); try { - app.listen(portalConfig.website.port, function () { - logger.debug(logSystem, 'Server', 'Website started on port ' + portalConfig.website.port); + app.listen(portalConfig.website.port, portalConfig.website.host, function () { + logger.debug(logSystem, 'Server', 'Website started on ' + portalConfig.website.host + ':' + portalConfig.website.port); }); } catch(e){ - logger.error(logSystem, 'Server', 'Could not start website on port ' + portalConfig.website.port + logger.error(logSystem, 'Server', 'Could not start website on ' + portalConfig.website.host + ':' + portalConfig.website.port + ' - its either in use or you do not have permission'); }