Auto start Next.js with supervisor

node.js

I want to start Next.js development server on my computer when it starts. Usually, this is done using pm2, I wanted to do it with supervisors. Install supervisor with command apt install -y supervisor Create file vi /etc/supervisor/conf.d/nextjs-todo.conf My Next.js application is located in the directory /mnt/data/sites/learn/nextjs/todo, so I used the following configuration [program:nextjs-todo] priority=200 … Read more

How to change Next.js port

node.js

You can start Next.js development server with the command npm run dev This will start the development server on port 3000. boby@sok-01:/www/learn/nextjs/todo (main)$ npm run dev > dev > next dev ready – started server on 0.0.0.0:3000, url: http://localhost:3000 event – compiled client and server successfully in 1645 ms (163 modules) wait – compiling… event … Read more