RSS

Auto start pm2 when reboot Windows

07 Sep

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”

 

 

 

 

Advertisements
 
Leave a comment

Posted by on September 7, 2017 in NodeJs, pm2

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

 
%d bloggers like this: