pm2

pm2

Start

# npm run start
    # pm2 to start this command: npm run start -- --port=4500
    pm2 start npm --name myAwesomeApp -- run start -- --port=4500

# node server.js
    # Start Next.js on different port for standalone mode.
    PORT=4500 pm2 start node --name myAwesomeApp -- .next/standalone/server.js

    # Start Next.js on different port using export for standalone mode.
    export PORT=4500
    pm2 start node --name myAwesomeApp -- .next/standalone/server.js

Logs

Logs of each process is located at ~/.pm2/logs.