Can the pm2 node module restarts the app after crash automatically

后端 未结 4 1767
我寻月下人不归
我寻月下人不归 2021-02-06 23:06

I have a node app ready which is workable, but has known and unknown bugs which crashes the node app. In such cases it would be nice if pm2 can restart the node app. Is this fea

4条回答
  •  南旧
    南旧 (楼主)
    2021-02-06 23:14

    This may help:

    # Generate Startup Script
    $ pm2 startup
    
    # Freeze your process list across server restart
    $ pm2 save
    
    # Remove Startup Script
    $ pm2 unstartup
    

    More details here

提交回复
热议问题