Browse Source
Bugfix/fix server startup message to properly display IPv6 addresses (#5716)
* Fix server startup message to properly display IPv6 addresses
* Update changelog
pull/5618/head
Szymon Łągiewka
7 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
19 additions and
1 deletions
-
CHANGELOG.md
-
apps/api/src/main.ts
|
|
@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
- Refactored various components to use self-closing tags |
|
|
|
|
|
|
|
### Fixed |
|
|
|
|
|
|
|
- Fixed the server startup message to properly display IPv6 addresses |
|
|
|
|
|
|
|
## 2.207.0 - 2025-10-08 |
|
|
|
|
|
|
|
### Added |
|
|
|
|
|
@ -90,7 +90,21 @@ 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 addressObject = address; |
|
|
|
let host = addressObject.address; |
|
|
|
|
|
|
|
if (addressObject.family === 'IPv6') { |
|
|
|
host = `[${addressObject.address}]`; |
|
|
|
} |
|
|
|
|
|
|
|
address = `${host}:${addressObject.port}`; |
|
|
|
} |
|
|
|
|
|
|
|
Logger.log(`Listening at http://${address}`); |
|
|
|
Logger.log(''); |
|
|
|
}); |
|
|
|
} |
|
|
|