summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xserver.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/server.js b/server.js
index 21d9094..791a227 100755
--- a/server.js
+++ b/server.js
@@ -174,7 +174,8 @@ io.on("connection", socket => {
// ------------------------------
const server = httpServer.listen(PORT, () => {
- const host = server.address().address;
- const port = server.address().port;
- console.log("Server listening at http://" + host + ":" + port);
+ let host = server.address().address;
+ if (host == "::") host = "localhost";
+ const port = server.address().port;
+ console.log("Server listening at http://" + host + ":" + port);
});