如何从自身内部重新启动 Node.js 应用程序(以编程方式)? [英] How can I restart a Node.js app from within itself (programmatically)?

查看:39
本文介绍了如何从自身内部重新启动 Node.js 应用程序(以编程方式)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何创建可以自行重启的应用程序?我想创建一个应用程序来设置一个可以自行重启的网络管理员.这可能吗?如果是这样,如何?我想这可能可以通过 node 中内置的 process 全局变量实现.

How can I create an app that can restart itself? I want to create an app that sets up a web-admin which can restart itself. Is this possible? If so, how? I was thinking this might be possible with the process global variable that is built into node.

推荐答案

我已经多次运行 Forever 并且很容易上手.查看:https://github.com/nodejitsu/forever

I have run Forever several times and it is easy to get started with. Check it out at: https://github.com/nodejitsu/forever

这篇关于如何从自身内部重新启动 Node.js 应用程序(以编程方式)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆