Skip to content

Conversation

@robbtraister
Copy link
Contributor

It is possible to request the server to run on any available port. This already works by using --port 0. However, the resulting logs show Uvicorn running on http://127.0.0.1:0 (Press CTRL+C to quit), making it very difficult to determine what port was selected.

This change will read the port number directly from the socket to ensure the bound port is displayed in all cases.

@Kludex Kludex changed the title improve discoverability when requesting any open port (via :0) Improve discoverability when --port=0 is used Mar 9, 2023
@Kludex
Copy link
Owner

Kludex commented Mar 9, 2023

Thanks! 🙏

@Kludex Kludex merged commit 9b0a8f6 into Kludex:master Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants