How do I run a node.js app as a background service?

Copying my own answer from How do I run a Node.js application as its own process? 2015 answer: nearly every Linux distro comes with systemd, which means forever, monit, PM2, etc are no longer necessary – your OS already handles these tasks. Make a myapp.service file (replacing ‘myapp’ with your app’s name, obviously): [Unit] Description=My … Read more