Skip to content

Change default port from 5000 to 3000#680

Merged
leo merged 1 commit intovercel:mainfrom
kud:patch-1
Nov 4, 2021
Merged

Change default port from 5000 to 3000#680
leo merged 1 commit intovercel:mainfrom
kud:patch-1

Conversation

@kud
Copy link
Copy Markdown
Contributor

@kud kud commented Oct 29, 2021

@kachkaev
Copy link
Copy Markdown

kachkaev commented Nov 3, 2021

3000 is used by Next.js and CRA by default, which means that ports will often clash in practice. Having said that, I don’t know what alternative number would be a clear winner.

Nice-looking ports like 6000, 9000 or 10000 are all used for something else, according to Wikipedia. Going for 30000 would require folks to count zeros and is therefore error-prone. Maybe 3030? 🤷

@leo
Copy link
Copy Markdown
Contributor

leo commented Nov 4, 2021

I don't think it will be common that people will run tools like Next.js and CRA and the same time as serve, but if they do, --listen <port> can be used for defining a custom one.

3000 as the new default sounds good to me!

@leo leo changed the title port: change it from 5000 to 3000 Change default port from 5000 to 3000 Nov 4, 2021
@leo leo merged commit 168d4b2 into vercel:main Nov 4, 2021
@leo
Copy link
Copy Markdown
Contributor

leo commented Nov 4, 2021

Thank you!

@kud kud deleted the patch-1 branch November 4, 2021 12:48
@kud
Copy link
Copy Markdown
Contributor Author

kud commented Nov 4, 2021

My pleasure 😊

@mariojfduarte
Copy link
Copy Markdown

If you have a Docker Swarm mode cluster set up with traefik as a load balance to do wtv, don't forget to change alll your docker files that use serve default port in order to prevent Bad Gateway connection errors.

`
...
RUN yarn global add serve
...
CMD serve -s -p 5000 build
...

`

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.

4 participants