From d4a25133d37e43c004641be60ae0dc1a57357d3a Mon Sep 17 00:00:00 2001 From: Vatsal Ambastha Date: Sun, 30 May 2021 00:40:54 +0530 Subject: [PATCH] Make service accessible from anyone(?) --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index f1bec56..6dae451 100644 --- a/server.js +++ b/server.js @@ -10,14 +10,14 @@ var httpServer = null; var httpsServer = null; if (config.httpConfig) { httpServer = http.createServer(); - httpServer.listen(config.httpConfig.port, function () { console.log('Listening on ' + httpServer.address().port); }); + httpServer.listen(config.httpConfig.port, '0.0.0.0', function () { console.log('Listening on ' + httpServer.address().port); }); } if (config.httpsConfig) { httpsServer = https.createServer({ key: fs.readFileSync(config.httpsConfig.ssl_key_file), cert: fs.readFileSync(config.httpsConfig.ssl_cert_file) }); - httpsServer.listen(config.httpsConfig.port, function () { console.log('Listening on ' + httpsServer.address().port); }); + httpsServer.listen(config.httpsConfig.port, '0.0.0.0', function () { console.log('Listening on ' + httpsServer.address().port); }); } var websocketSignalingServer = new wns.WebsocketNetworkServer(); for (var _i = 0, _a = config.apps; _i < _a.length; _i++) {