From 536088ffe2d47ecb2ccec229155e994d8beccb97 Mon Sep 17 00:00:00 2001 From: Jacob Heun Date: Wed, 2 Oct 2019 15:28:48 +0200 Subject: [PATCH 1/2] fix: log the bound port and host License: MIT Signed-off-by: Jacob Heun --- src/listener.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/listener.js b/src/listener.js index ac675f8..a2eaa57 100644 --- a/src/listener.js +++ b/src/listener.js @@ -59,7 +59,8 @@ module.exports = ({ handler, upgrader }, options) => { const { host, port } = listeningAddr.toOptions() server.listen(port, host, err => { if (err) return reject(err) - log('Listening on %s %s', port, host) + const { address, port } = server.address() + log('Listening on %s:%s', address, port) resolve() }) }) From 8da431c3056fd34f34dc511e01cf0ab8a1bd191c Mon Sep 17 00:00:00 2001 From: Jacob Heun Date: Wed, 2 Oct 2019 16:42:15 +0200 Subject: [PATCH 2/2] fix(log): just log the entire address License: MIT Signed-off-by: Jacob Heun --- src/listener.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/listener.js b/src/listener.js index a2eaa57..975eb93 100644 --- a/src/listener.js +++ b/src/listener.js @@ -59,8 +59,7 @@ module.exports = ({ handler, upgrader }, options) => { const { host, port } = listeningAddr.toOptions() server.listen(port, host, err => { if (err) return reject(err) - const { address, port } = server.address() - log('Listening on %s:%s', address, port) + log('Listening on %s', server.address()) resolve() }) })