Skip to content

Instantly share code, notes, and snippets.

@maliarslan
maliarslan / node-app-as-service-on-ubuntu.md
Last active May 26, 2024 10:19
Run Node.js application as service on Ubuntu 16.04

Assuming that you have already installed Node.js on your system. If you haven't visit https://nodejs.org/en/download/package-manager/

First we need to create a service file into /lib/systemd/system to introduce our service.

So, with your favorite editor, open up a new file there with;

sudo nano /lib/systemd/system/mygreatestapp.service

Put the following contents in it;

[Unit]