Process managers for Express appsExpress应用程序的流程管理器
Warning: This information refers to third-party sites, products, or modules that are not maintained by the Expressjs team. 警告:此信息指的是Expressjs团队未维护的第三方站点、产品或模块。Listing here does not constitute an endorsement or recommendation from the Expressjs project team.此处列出的内容并不构成Expressjs项目团队的认可或建议。
When you run Express apps for production, it is helpful to use a process manager to:运行Express apps for production时,使用流程管理器执行以下操作非常有用:
Restart the app automatically if it crashes.如果应用程序崩溃,请自动重新启动应用程序。
Gain insights into runtime performance and resource consumption.深入了解运行时性能和资源消耗。
Modify settings dynamically to improve performance.动态修改设置以提高性能。
Control clustering.控制群集。
A process manager is somewhat like an application server: it’s a “container” for applications that facilitates deployment, provides high availability, and enables you to manage the application at runtime.process manager有点像应用程序服务器:它是应用程序的“容器”,有助于部署、提供高可用性,并使您能够在运行时管理应用程序。
The most popular process managers for Express and other Node.js applications are:Express和其他Node.js应用程序最流行的流程管理器包括:
- Forever
: A simple command-line interface tool to ensure that a script runs continuously (forever). :一个简单的命令行界面工具,用于确保脚本连续(永久)运行。Forever’s simple interface makes it ideal for running smaller deployments of Node.js apps and scripts.Forever的简单界面非常适合运行Node.js应用程序和脚本的小型部署。
- PM2
: A production process manager for Node.js applications that has a built-in load balancer. :具有内置负载平衡器的Node.js应用程序的生产流程管理器。PM2 enables you to keep applications alive forever, reloads them without downtime, helps you to manage application logging, monitoring, and clustering.PM2使您能够永远保持应用程序的活力,在不停机的情况下重新加载它们,帮助您管理应用程序日志记录、监视和群集。
StrongLoop Process Manager (Strong-PM)Strong循环流程管理器(Strong PM): A production process manager for Node.js applications with built-in load balancing, monitoring, and multi-host deployment. :Node.js应用程序的生产流程管理器,内置负载平衡、监控和多主机部署。Includes a CLI to build, package, and deploy Node.js applications to a local or remote system.包括用于将Node.js应用程序构建、打包和部署到本地或远程系统的CLI。
- SystemD
: The default process manager on modern Linux distributions, that makes it simple to run a Node application as a service. :现代Linux发行版上的默认进程管理器,使节点应用程序作为服务运行变得简单。For more information, see “Run node.js service with systemd” by Ralph Slooten (@axllent).有关更多信息,请参阅Ralph Slooten(@axllent)的“使用systemd运行node.js服务”。