creat-react-app生成的項目默認端口號是3000,以下能夠更改:react
在package.json中修改 "start":"react-scripts start", 爲 "start":"set PORT=9000 && react-scripts start",
next.js按文檔生成的項目默認也是3000json
"scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "next -p 9000" },
加 -p 端口號 便可。app