Problem
When the API is started with PORT=0, Node correctly asks the operating system to select an available ephemeral port, but the startup message still uses the configured value and prints:
API listening on http://localhost:0
Port 0 is not the port clients can connect to. This makes the documented startup output unusable for integration tests, preview environments, and other workflows that intentionally request an ephemeral port.
Expected behavior
After the server starts, the log should contain the actual bound port selected by the operating system. Explicit non-zero ports should continue to be reported unchanged.
Proposed fix
- Capture the
http.Server returned by app.listen().
- Read the bound address inside the listening callback and log its actual port.
- Add a regression test that starts the API with
PORT=0 and verifies a positive reachable port is reported.
This issue is limited only to the creator of this issue. This means that only the issue author can attempt to solve this issue. If you would like to work on it, please create another issue with the same contents and refer to issue #743 for more information.
Problem
When the API is started with
PORT=0, Node correctly asks the operating system to select an available ephemeral port, but the startup message still uses the configured value and prints:Port
0is not the port clients can connect to. This makes the documented startup output unusable for integration tests, preview environments, and other workflows that intentionally request an ephemeral port.Expected behavior
After the server starts, the log should contain the actual bound port selected by the operating system. Explicit non-zero ports should continue to be reported unchanged.
Proposed fix
http.Serverreturned byapp.listen().PORT=0and verifies a positive reachable port is reported.This issue is limited only to the creator of this issue. This means that only the issue author can attempt to solve this issue. If you would like to work on it, please create another issue with the same contents and refer to issue #743 for more information.