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

Change default port from 5000 to 3000 #680

Merged
merged 1 commit into from
Nov 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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