creat-react-app-generated project default port number is 3000, how to change?

As can be seen package.json files in the project, npm start that is scripts start.js , we find scripts / start.js, part of the code is as follows:

Find  DEFAULT_PORT variables, modify its default value.

 

After saving scripts / start.js, then execute npm start , you can see that the project is running on port 3333.


Guess you like

Origin www.cnblogs.com/cui-6/p/11208609.html