Using systemd and launchd to run Node.js in the background
Jul 26, 2017 · 1 min read
When you are developing and testing your application, it’s ok to constantly start the Node.js server; however, once you’ve finished or you are trying to setup a production web server you want the Node.js service to always be running in the background. Let’s explore the variety of ways to accomplish this.
To run Node.js as a background service you can leverage the systemd for most Linux distros. For OSX you can leverage launchd.
You will need to create one file per application you wish to run.
Read the full examples for running Node.js as a background service for either Linux or OSX based on your requirements.
