i-love-flamingo/flamingo

Use real port information in `ServerStartEvent`

tessig opened this issue · 0 comments

Without further configuration Flamingo starts the server on port 3322 (normal router) or 3210 (prefixrouter) and the systemendpoint on 13210.

However, if you configure :0, the net.Listener will internally choose an available port and there is no possibility to know which ports have been selected.

The ServerStartEvent just has the configuration :0 instead of the "real port".
Also the log messages "Starting HTTP Server ..." and "systemendpoint: Start at ..." have only the configuration value.

Configuration for systemendpoint is flamingo.systemendpoint.serviceAddr
The main port is given by the --addr flag in the serve command (for router and prefixrouter respectively)