Install Node.js (and npm), use nvm for ease of use
Using pm2 to manage the app as a service and restart on crashes.
cd /var/www/apilabpm2 start npm --name="apilab" -- start`
For the CI, on our droplet, make sure rsync is running:
# Enable rsync servicesudo systemctl enable rsync.service# Check if enabledsystemctl list-unit-files | grep rsync# Make a config file with the `apilab` module# For more info about the `rsyncd.conf`, see https://download.samba.org/pub/rsync/rsyncd.conf.htmlecho$'uid = root\ngid = root\nlog file = /var/log/rsync.log\n\n[apilab]\n\tpath = /var/www/apilab\n\tread only = false'> /etc/rsyncd.conf# Start rsync servicesudo systemctl start rsync.service# Check rsync status (also useful if the below command doesn't show rsync after trying to start it)sudo systemctl status rsync.service# Check if rsync is runningsystemctl | grep rsync