Bind website listener to host

This commit is contained in:
Elbandi 2014-05-09 13:41:16 +02:00
parent 05b6f9308b
commit da0264f8de
2 changed files with 4 additions and 3 deletions

View File

@ -11,6 +11,7 @@
"website": {
"enabled": true,
"host": "0.0.0.0",
"port": 80,
"stratumHost": "cryppit.com",
"stats": {

View File

@ -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');
}