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",
    //...
}

 

posted @ 2021-01-16 13:28  夏秋初  阅读(84)  评论(0编辑  收藏  举报