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

Correctly output selected port if port=0 #530

Closed
simonw opened this issue Dec 19, 2019 · 1 comment · Fixed by #531
Closed

Correctly output selected port if port=0 #530

simonw opened this issue Dec 19, 2019 · 1 comment · Fixed by #531

Comments

@simonw
Copy link
Contributor

@simonw simonw commented Dec 19, 2019

If you run Uvicorn with port=0, it selects an unused port (as it should). But... it logs the incorrect URL:

$ datasette --memory -p 0
Serve! files=() (immutables=()) on port 0
INFO:     Started server process [28673]
INFO:     Uvicorn running on http://127.0.0.1:0 (Press CTRL+C to quit)

It should output the selected port in that message instead.

@simonw

This comment has been minimized.

Copy link
Contributor Author

@simonw simonw commented Dec 19, 2019

With the fix from my pull request the output looks like this:

$ datasette --memory -p 0
Serve! files=() (immutables=()) on port 0
INFO:     Started server process [29058]
INFO:     Uvicorn running on http://127.0.0.1:55395 (Press CTRL+C to quit)
tomchristie added a commit that referenced this issue Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.