如何自动重启节点应用程序

如何自动重启节点应用程序

本文介绍了如何自动重启节点应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行一个节点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.

这篇关于如何自动重启节点应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 14:44