1、npm install -g create-react-app
2、create-react-app my-app
3、cd my-app
4、npm start
使用 npm start
启动应用
默认情况下,启动的都是3000端口, 若要更改, 可在package.json中修改如下配置:

start: "set PORT=3003&&react-scripts start",
再次npm start 启动即可更改默认端口.
1、npm install -g create-react-app
2、create-react-app my-app
3、cd my-app
4、npm start
使用 npm start
启动应用
默认情况下,启动的都是3000端口, 若要更改, 可在package.json中修改如下配置:
start: "set PORT=3003&&react-scripts start",
再次npm start 启动即可更改默认端口.
本文标题:create-react-app 修改默认的3000端口号
本文链接:https://www.haomeiwen.com/subject/tkzopctx.html
网友评论