Home  >  Article  >  Web Front-end  >  What is the method to modify the port number in react

What is the method to modify the port number in react

王林
王林forward
2020-12-07 16:14:522748browse

What is the method to modify the port number in react

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!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete