From 61bb0f159a28174a23426ca6755bbfb280df08ef Mon Sep 17 00:00:00 2001 From: Skye <46286597+Skye-31@users.noreply.github.com> Date: Fri, 12 Aug 2022 19:35:39 +0100 Subject: [PATCH] feat: display all listening ports --- packages/http-server/src/index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/http-server/src/index.ts b/packages/http-server/src/index.ts index 4e26e7ba1..7f4d4783d 100644 --- a/packages/http-server/src/index.ts +++ b/packages/http-server/src/index.ts @@ -459,8 +459,11 @@ export async function startServer( server.listen(port, host, () => { const log = mf.log; const protocol = httpsEnabled ? "https" : "http"; - const accessibleHosts = host ? [host] : getAccessibleHosts(true); - log.info(`Listening on ${host ?? ""}:${port}`); + const accessibleHosts = getAccessibleHosts(true).sort(); + log.info("Listening on"); + if (host) { + log.info(`- ${protocol}://${host}:${port}`); + } for (const accessibleHost of accessibleHosts) { log.info(`- ${protocol}://${accessibleHost}:${port}`); }