node.js - How to make nodejs application forever restart automatically?
高洛峰
高洛峰 2017-06-14 10:51:32
0
2
1023

Ubuntu 16.04, how to make the nodejs application automatically restart when the system restarts?

I used it

npm install -g forever forever start app.js

But restarting the system does not automatically start app.js, you still have to restart it manually

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all (2)
刘奇

Put the startup command in the boot script

    typecho

    Use pm2 to execute pm2 startup and then pm2 save

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!