npm run dev on different port nextjs code example Example: how to change port in next js scripts: { "dev": "next -p 8000" }