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

Try new Live Reload ports if default is taken #731

Closed
JoelMarcey opened this issue Jun 6, 2018 · 10 comments
Closed

Try new Live Reload ports if default is taken #731

JoelMarcey opened this issue Jun 6, 2018 · 10 comments
Labels
difficulty: starter Issues that are starter difficulty level, e.g. minimal tweaking with a clear test plan. good first issue If you are just getting started with Docusaurus, this issue should be a good place to begin.

Comments

@JoelMarcey
Copy link
Contributor

Is this a bug report?

Not really. Sort of.

Have you read the Contributing Guidelines on issues?

Yes

Environment

N/A

Steps to Reproduce

  1. Run yarn start on a site
  2. Run yarn start on another site

Expected Behavior

Both sites run.

Actual Behavior

The server port will get to 3001. But the Live Reload port errors out as duplicate.

Reproducible Demo

See steps to reproduce above

@JoelMarcey JoelMarcey added the good first issue If you are just getting started with Docusaurus, this issue should be a good place to begin. label Jun 6, 2018
@endiliey endiliey added the difficulty: starter Issues that are starter difficulty level, e.g. minimal tweaking with a clear test plan. label Jun 7, 2018
@endiliey
Copy link
Contributor

endiliey commented Jun 7, 2018

Just gonna put the relevant codes/ tips to guide those who want to take this issue:

For now, the live reload had a fixed port as constant
https://github.com/facebook/Docusaurus/blob/49c27b733bf62506acff3c55f92143dc0ef3ed86/lib/server/server.js#L570-L575

Look at how we attempt to use different port when starting a server. Take inspiration from this & you'll solve this issue 😄
https://github.com/facebook/Docusaurus/blob/49c27b733bf62506acff3c55f92143dc0ef3ed86/lib/start-server.js#L52-L76

I'll be happy to help anyone who wanted to fix this issue

@vaibhavsingh97
Copy link

hi @JoelMarcey , can I take this up 😄
Looks like perfect place to start 👍

@endiliey
Copy link
Contributor

endiliey commented Jun 7, 2018

@vaibhavsingh97 It's yours

@endiliey endiliey added the status: claimed Issue has been claimed by a contributor who plans to work on it. label Jun 7, 2018
@yangshun
Copy link
Contributor

yangshun commented Jun 9, 2018

@vaibhavsingh97 It's yours!

I've added an "issue-claimed" label so that others will know not to start work on the issue. If you change your mind about the issue, no worries! Just let me know so that I can remove the label and free it up for someone else to claim.

I'll check in with you periodically so that we can keep the task updated with the progress.

@vaibhavsingh97
Copy link

yeah sure, Right now I am learning react as I am not familiar with it. I will try to fix after that.

@yangshun
Copy link
Contributor

If I'm not wrong, this portion of the code doesn't require React knowledge; more of Node.js 😄

@vaibhavsingh97
Copy link

@yangshun Oh! yes, I will soon send a PR 😄

@vaibhavsingh97
Copy link

@yangshun @endiliey I had sent the PR #769 😄
can you help me in testing, I don't know how can I do it? I have read the https://docusaurus.io/docs/en/installation.html but it talks about how can I install using npm or yarn

@JoelMarcey
Copy link
Contributor Author

Hi @vaibhavsingh97 -- https://github.com/facebook/Docusaurus/tree/master/admin should give you some docs on how to test your changes either with Docusaurus or another project.

@vaibhavsingh97
Copy link

Thanks @JoelMarcey successfuly tested and fixed the bug 😄

@endiliey endiliey removed the status: claimed Issue has been claimed by a contributor who plans to work on it. label Jul 18, 2018
@endiliey endiliey added v2-mvp and removed v2-mvp labels Aug 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: starter Issues that are starter difficulty level, e.g. minimal tweaking with a clear test plan. good first issue If you are just getting started with Docusaurus, this issue should be a good place to begin.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants