一个应用程序正在端口 3000 上运行,我想在默认端口的不同端口上运行另一个应用程序。我如何在 React Next.js 中更改此设置。 我的 package.js 脚本是
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "next",
"build": "next build",
"start": "next start"
},
启动脚本命令是
npm 运行开发
最佳答案
这对我有用
"scripts": {
"dev": "next dev -p 8080",
"start": "next start -p 8080",
},
关于javascript - 如何在 next.js 中设置端口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60147499/