Localhost11501 Link -

"scripts": "dev": "next dev -p 4000"

Set environment variable:

$env:PORT=4000 # Windows PowerShell export PORT=4000 # Mac/Linux npm start Change the port mapping in your run command: localhost11501 link