diff options
-rwxr-xr-x | server.js | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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); }); |