简体   繁体   English

如何在Red Hat Linux上将Node.js应用程序设置为服务

[英]How to setup a Node.js application as a service on Red Hat Linux

I created a node.js application. 我创建了一个node.js应用程序。 It is a web server with the Express framework. 它是带有Express框架的Web服务器。 I can start it with the command node server.js . 我可以使用命令node server.js来启动它。 This application is deployed on a Red Hat Enterprise server. 该应用程序已部署在Red Hat Enterprise服务器上。

I want this applicaion can: 我希望此应用程序可以:

  1. Start automatically when the OS is started. 操作系统启动时自动启动。
  2. Restart automatically when it crashes. 崩溃时自动重新启动。

I think OS service can meet my requirements, right? 我认为OS服务可以满足我的要求,对吗? Is there any clue how to setup the Node.js application as service on Red Hat? 有什么线索可以在Red Hat上将Node.js应用程序设置为服务吗?

您可以使用forevernode.js作为服务运行,并且将nginx Webserver作为前端服务器运行,更多详细信息在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM