chore: print resolved host in the http server terminal

This commit is contained in:
Pavel Feldman 2024-05-06 10:48:20 -07:00
parent b5dee9ecb7
commit dbff517772

View file

@ -126,7 +126,8 @@ export class HttpServer {
this._urlPrefix = address; this._urlPrefix = address;
} else { } else {
this._port = address.port; this._port = address.port;
this._urlPrefix = `http://${host}:${address.port}`; const resolvedHost = address.family === 'IPv4' ? address.address : `[${address.address}]`;
this._urlPrefix = `http://${resolvedHost}:${address.port}`;
} }
} }
return this._urlPrefix; return this._urlPrefix;