question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why does Gatsby start a second server at localhost:4000?

See original GitHub issue

When I create a new gatsby app and run gatsby develop, it starts a server at localhost:8000 and then a second one on localhost:4000, where I’m able to query things like “allGatsbyPlugin”:

Screen Shot 2020-05-30 at 2 40 45 PM

I can’t find documentation on gatsby starting things on ports other than localhost:8000. What is this, why is it here (I discovered it because it’s interfering with something else I run on port 4000), and can I change the port it runs on?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
KyleAMathewscommented, May 31, 2020

Yeah — 4000 wasn’t a good choice for the default recipes port as it’s used a lot for apps. Opened https://github.com/gatsbyjs/gatsby/pull/24665 to move it to 50400 which is a cool number as it’s a highly composite number! https://en.wikipedia.org/wiki/50,000

0reactions
bytheway875commented, Jun 1, 2020

@KyleAMathews Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error [HPM] Error occurred while trying to proxy request / from ...
This will start the server. Then run npm start in another terminal window. npm start will call "ng serve --proxy-config ./proxy.json". My ...
Read more >
Creating a Source Plugin - Gatsby
This is a GraphQL server running in Node.js and is separate from Gatsby, ... Create a new Gatsby plugin with the gatsby new...
Read more >
Subscriptions - Apollo GraphQL Docs
They can maintain an active connection to your GraphQL server (most commonly via WebSocket), enabling the server to push updates to the subscription's...
Read more >
Elixir learning: Running a Gatsby blog inside a Phoenix app
server from the base of your project, the my_app directory and opening localhost:4000 in your web browser. The static site generated by Gatsby...
Read more >
2. Start the Emulator | Static Web Apps CLI
The SWA Emulator is run by using the swa start command. ... Start the SWA CLI in a new terminal with the dev...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found