问题描述
我正在运行一个节点Strongloop应用程序,如果崩溃,则需要将其自动重新启动.自动重新启动节点应用程序的最佳方法是什么?当这些崩溃发生时,还有反正要通知吗?
I am running a node strongloop application and need for it be auto-restarted if it crashes. what is the best way to auto restart a node application? Also is there anyway to be notified when these crashes occur?
推荐答案
您可以使用流程管理器,例如Strongloop流程管理器( http://strong- pm.io/),PM2( http://pm2.keymetrics.io/)和Forever( https://github.com/foreverjs/forever ).还要检查这三者的比较( http://strong-pm.io/compare/).您还可以检查pm2-monitor( https://www.npmjs.com/package/pm2-mon )通知以及服务器重新启动.
You could use process managers like Strongloop process manager (http://strong-pm.io/), PM2 (http://pm2.keymetrics.io/) and Forever (https://github.com/foreverjs/forever). Also check the comparison of these three (http://strong-pm.io/compare/). You can also check pm2-monitor (https://www.npmjs.com/package/pm2-monitor) for notifications along with server restart.
这篇关于如何自动重启节点应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!