Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve discoverability when --port=0 is used #1890

Merged
merged 1 commit into from Mar 9, 2023
Merged

Improve discoverability when --port=0 is used #1890

merged 1 commit into from Mar 9, 2023

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
Sponsor Member

Kludex commented Mar 9, 2023

Thanks! 🙏

@Kludex Kludex merged commit 9b0a8f6 into encode: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.

None yet

2 participants