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

[feature request] fallback to random port when default port is not available #1094

Open
kzhsw opened this issue Apr 10, 2023 · 1 comment
Open

Comments

@kzhsw
Copy link

kzhsw commented Apr 10, 2023

Currently miniserve use 8080 as default port and fail when this port is unavailable, and just exits, since urls would be displayed after bind succeed, it can fallback to random port when default port is not available, and show this to user later. If port is set over command-line, or through a different option, this behavior can be disabled.
This would be helpful for windows non-dev users who would just double-click the binary and wait.

@svenstaro
Copy link
Owner

I think that's reasonable for interactive usage if a terminal is attached. Would you like to take a stab at this?

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

No branches or pull requests

2 participants