summaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2022-08-22 21:21:53 +0200
committerTom Smeding <tom@tomsmeding.com>2022-08-22 21:21:53 +0200
commita3bdfe58867d57b39cf139fe7134c020fc9dcb44 (patch)
treeb7607135bcf0c873a7ffe89a0bee8dffe069b878 /server.js
parentd1c02019db9a6fb2ab053091c9a4a32dc00b8b50 (diff)
Reformatting, print 'localhost' instead of :::
Diffstat (limited to 'server.js')
-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);
});