#Change port for built nuxt app
4 messages · Page 1 of 1 (latest)
go to your root directory in package.json and change this scripts
"scripts": {
"dev": "nuxt dev --port 3001",
},
Set the PORT env variable to 3001 when running the build app. If you use the default node path/to/server.mjs command to run it, you can change it to PORT=3001 node path/to/server.mjs (on Mac and Linux)
this will work only in dev mode