

Running your application with the Linux init system will ensure that it’s familiar to any Linux sysadmin. An Explanation of Linux Init SystemsĪlthough PM2 and similar tools are ubiquitous in the Node.js world, that’s not necessarily the case in other communities.
Runjs in linux how to#
In this blog post, I’m going to show you how to do each of these three things with systemd. PM2’s ease of use is certainly one of its strongest points it hides some of the operational realities of running services on Linux from Node.js developers.

Please note that I’ve no intention of casting aspersions on any of the tools I’ve mentioned. In this blog post, I’ll show you how to recreate process management, logging and clustering functionality using the Linux init system, systemd, and I’ll make the case for this being a superior approach.

However, I’m a firm believer in using the Linux init system for process monitoring. For example, in addition to process monitoring, PM2 also boasts features around logging and port-sharing or clustering. The Node.js community has embraced process monitoring tools such as PM2, Nodemon, and Forever, which is understandable.
