Closed bonsairobo closed 3 months ago
Similarly, the after_start
callback will not provide the correct port.
Yeah I haven't set that up yet. Shouldn't be too bad, I can look into it.
This one was way easier after the glisten
work had been done. It's also gonna require a major version release, and also has to wait for me to release the major version of glisten
.
I can't guarantee any specific time, but I think I'm reaching a decent critical mass of things to do these releases. So it should be soon! I'll leave this open until it's actually released.
Okay, this should be out on master. There are start_http_server
and start_https_server
methods that return a Server
type. That can be passed to mist.get_port
. The normal logger that says Listening at ...
will list an OS-assigned port if you provide 0. But you can also access it programmatically. I'll be releasing this soon.
I tried calling
mist.port(0)
and the service logsListening on http://localhost:0
instead of providing the actual port allocated by the OS.