From c7f14ee25594c8d4f65cb55fc9b0a464f4d32070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20=C5=81=C4=85giewka?= Date: Fri, 10 Oct 2025 10:00:35 +0200 Subject: [PATCH] fix(api): print v6 address URL in brackets This allows to click and open from the log since v6 addresses are now properly formatted. --- apps/api/src/main.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/apps/api/src/main.ts b/apps/api/src/main.ts index 41f156cbf..6ff2e77e9 100644 --- a/apps/api/src/main.ts +++ b/apps/api/src/main.ts @@ -90,7 +90,17 @@ async function bootstrap() { await app.listen(PORT, HOST, () => { logLogo(); - Logger.log(`Listening at http://${HOST}:${PORT}`); + + let address = app.getHttpServer().address(); + if (typeof address === 'object') { + const addressObj = address; + let host = addressObj.address; + if (addressObj.family === 'IPv6') { + host = `[${addressObj.address}]`; + } + address = `${host}:${addressObj.port}`; + } + Logger.log(`Listening at http://${address}`); Logger.log(''); }); }