Run `node server` command in Ubuntu 18 on startup and reboot

128 views Asked by At

I've installed the Adapt Authoring tool on an AWS Ubuntu 18 instance. It is started up with a node server command. I've looked into pm2 and some other solutions. I can start the process using pm2 start 'node server', but pm2 does not list the process so I can't save it... I've also looked at upstart, which seems possibly outdated. I tried to add a process using update-rc.d to no effect. I also tried adding a service to /etc/systemd/system/. No go. None of these solutions seem to work with this startup command.

What is the solution I am supposed to be using for this?

1

There are 1 answers

1
Lou Groshek On

Looks like pm2 will work, but it needs to be run like so: pm2 start 'node server'. Then it will run, list, and save the process.