The specific steps are as follows:
(Related recommendations: react tutorial)
First open the package.json file of the react project ;
Then i modify the start key-value pair in scripts to
"start": "react-scripts start"
.
"scripts": { "start": "set PORT=9000 && react-scripts start", "build": "react-scripts build", "test": "react-scripts test --env=jsdom", "eject": "react-scripts eject" }
The above is the detailed content of What is the method to modify the port number in react. For more information, please follow other related articles on the PHP Chinese website!