From ecda62a08e6c1a43461d3e52287c9c8a9ad66fdd Mon Sep 17 00:00:00 2001 From: Mark Redeman Date: Tue, 25 Oct 2016 13:31:31 +0200 Subject: [PATCH] Don't hardcode the server's hostname This fixes a usability bug where the server is run inside of a Docker container (and probably also when inside of VM?). Since the container is run on a different IP the server wouldn't listen to any incoming requests. This does come with the downside that the server will now accept connections on any IP address. --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 58a33b5..dbb97c3 100644 --- a/server.js +++ b/server.js @@ -21,7 +21,7 @@ app.get("*", function(req, res) { res.sendFile(path.join(__dirname, "index.html")); }); -app.listen(serverPort, "localhost", function (err) { +app.listen(serverPort, function (err) { if (err) { console.log(err); return;