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

Run saber server on 3001 port if 3000 is being used #182

Closed
nblthree opened this issue May 13, 2019 · 3 comments · Fixed by #184
Closed

Run saber server on 3001 port if 3000 is being used #182

nblthree opened this issue May 13, 2019 · 3 comments · Fixed by #184

Comments

@nblthree
Copy link
Member

Feature request

What problem does this feature solve?

Running saber server whiteout passing a port argument while the port 3000 is being used break the app

What does the proposed API look like?

Run the server on the port 3001 automatically

How should this be implemented in your opinion?

N/A

Are you willing to work on this yourself?

YES

@kidonng
Copy link
Contributor

kidonng commented May 14, 2019

We already have --port option, this looks unnecessary somewhat.

@krmax44
Copy link
Contributor

krmax44 commented May 14, 2019

@kidonng but it's much more elegant if Saber just binds itself to an available port instead of crashing whenever 3000 is already used.

@kidonng
Copy link
Contributor

kidonng commented May 14, 2019

Running multiple dev server is rare, it's common to show a message notifying the port is taken. Though I agree Saber shouldn't simply crash.

egoist pushed a commit that referenced this issue May 25, 2019
Closes #182

* use get-port

* tweak

* use if syntax

* delete comments

* validate the port in lib/index.js

* tweaks

* tweaks

* tweaks

* tweaks
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 a pull request may close this issue.

3 participants