Skip to content

Commit

Permalink
Change default port from 5000 to 3000 (#680)
Browse files Browse the repository at this point in the history
  • Loading branch information
kud authored Nov 4, 2021
1 parent 30b0673 commit 168d4b2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const getHelp = () => chalk`
{bold $} {cyan serve} folder_name
{bold $} {cyan serve} [-l {underline listen_uri} [-l ...]] [{underline directory}]
By default, {cyan serve} will listen on {bold 0.0.0.0:5000} and serve the
By default, {cyan serve} will listen on {bold 0.0.0.0:3000} and serve the
current working directory on that address.
Specifying a single {bold --listen} argument will overwrite the default, not supplement it.
Expand Down Expand Up @@ -152,7 +152,7 @@ const parseEndpoint = (str) => {

return [url.pathname];
case 'tcp:':
url.port = url.port || '5000';
url.port = url.port || '3000';
return [parseInt(url.port, 10), url.hostname];
default:
throw new Error(`Unknown --listen endpoint scheme (protocol): ${url.protocol}`);
Expand Down Expand Up @@ -419,7 +419,7 @@ const loadConfig = async (cwd, entry, args) => {

if (!args['--listen']) {
// Default endpoint
args['--listen'] = [[process.env.PORT || 5000]];
args['--listen'] = [[process.env.PORT || 3000]];
}

if (args._.length > 1) {
Expand Down

4 comments on commit 168d4b2

@bgkittrell
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, we weren't explicitly setting the port and just barely caught this before going to production. Would have been a mess. Not blaming you we should have been setting the port. Just thought I should say something.

@karoldanutama
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bgkittrell likewise. Our all staging environments frontend pods suddenly stopped working since our ingress controller was configured to port 5000. No pod errors or restart count anomaly detected, but suddenly all of our static assets are not served.

@maud-rod
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise!!!!!!!!!!

@ErikBoee
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise!!!!!!!!!!

try to keep it civil

Please sign in to comment.