Category Archives: NodeJs

Auto start pm2 when reboot Windows

install pm2:

$ npm install pm2 -g

install mp2 start for windows

$ npm install pm2-windows-startup -g


install pm2 window service

$ npm i pm2-windows-service -g

$ pm2-service-install [-n <service name>]

and go to this install path: C:\Users\Administrator\AppData\Roaming\npm\node_modules\pm2-windows-service\src\daemon\ and find file

is called “mp2node” and edit at <argument>[js file].js</argument> to path of your javascript file and save and reboot service in “Service.msc”





Leave a comment

Posted by on September 7, 2017 in NodeJs, pm2