create-react-app 工程,如何修改react端口号?

转自:https://www.cnblogs.com/liangzhixiaolaohu/p/12858660.html

修改package.json

// win
"scripts": {
    "start": "set PORT=5000 && react-scripts start",
    //...
}
// mac
"scripts": {
    "start": "PORT=5000 react-scripts start",
    //...
}