linerpets.blogg.se

Runjs in linux
Runjs in linux








runjs in linux

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.

  • Port-sharing magic for Node.js applications.
  • I will be making reference to PM2 because it has become ubiquitous in the Node.js community, and therefore it will serve as most people’s frame of reference. But I think gaining familiarity with Linux is important for Node.js developers it’s important to use standard tools that are well-proven and widely understood by sysadmins everywhere.

    runjs in linux

    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.

    runjs in linux

    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.










    Runjs in linux