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

feat: run saber server on 3001 port if 3000 is unavailable #184

Merged
merged 10 commits into from
May 25, 2019
Merged

feat: run saber server on 3001 port if 3000 is unavailable #184

merged 10 commits into from
May 25, 2019

Conversation

nblthree
Copy link
Member

Summary
Closes #182
What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

If changing the UI/CSS related code, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

You have tested in the following browsers: (Providing a detailed version will be better.)

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated
  • Related tests have been updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

@netlify
Copy link

netlify bot commented May 15, 2019

Deploy preview for saber ready!

Built with commit 9ac1b24

https://deploy-preview-184--saber.netlify.com

packages/saber/lib/cli.js Outdated Show resolved Hide resolved
@nblthree nblthree marked this pull request as ready for review May 15, 2019 14:46
packages/saber/lib/cli.js Outdated Show resolved Hide resolved
@nblthree nblthree requested a review from egoist May 25, 2019 02:55
@nblthree
Copy link
Member Author

Nice

@egoist egoist changed the title Closes #182: Run saber server on 3001 port if 3000 is unavailable feat: run saber server on 3001 port if 3000 is unavailable May 25, 2019
@egoist egoist merged commit d5d5632 into saberland:master May 25, 2019
@nblthree nblthree deleted the port branch May 25, 2019 16:57
@kidonng
Copy link
Contributor

kidonng commented May 27, 2019

In a rare case, I run saber and it automatically "switched" to a new port after reloading (I didn't run any other server at the same time). But actually it still serves the pages on port 3000. It doesn't bother a lot so I don't open an issue for this.

~\..\..\the-story: master ≣ +1 ~6 -1 | ~5 -0 ! > saber
info Using config file: saber-config.js
info Using theme: ./theme
info Using 20 plugins
success Compiled client successfully in 14s!
info Available at http://localhost:3000
info 165 MB memory used
warning Found a change in your Saber config file, restart server to see the effect.
info (21:3:37) Rebuilding client due to changes in ~\Documents\Projects\the-story\.saber\config.json
success Compiled client successfully in 282ms!
warning Port 3000 is in use, switched to a new port
info Available at http://localhost:3001
info 93.7 MB memory used
info (21:5:4) Rebuilding client due to changes in ~\Documents\Projects\the-story\.saber\config.json
success Compiled client successfully in 257ms!
warning Port 3000 is in use, switched to a new port
info Available at http://localhost:3001
info 98.8 MB memory used

@nblthree nblthree restored the port branch May 27, 2019 13:35
@nblthree nblthree deleted the port branch May 27, 2019 13:38
@nblthree
Copy link
Member Author

@kidonng nice catch. found the problem will make a PR to fix it

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.

Run saber server on 3001 port if 3000 is being used
3 participants