0

I have a node app that I would like to run at startup but I cannot get it to work. I am running Ubuntu 14.04. The first command starts the process and works as intended but when I run pm2 startup and pm2 save from below and reboot the box I have no luck with the app launching at boot.

# Start the process
NODE_ENV="production" pm2 start /home/expressjs/app_name/app.js -u expressjs --watch --name "app_name"
# Create a startup script and save the process.
sudo env PATH=$PATH:/usr/local/bin pm2 startup ubuntu -u expressjs
pm2 save
mac2017
  • 445
  • 1
  • 6
  • 16
  • Dupe (but without an accepted answer): http://stackoverflow.com/questions/32053549/start-node-js-application-when-server-reboots-with-pm2 – Kevin B Aug 17 '15 at 19:46
  • Yeah this is not a dupe. Did you read my question? The solution that you reference is what I have posted above but it's clearly not working which is why I posted a question here. – mac2017 Aug 23 '15 at 17:14
  • I didn't actually vote to close it as a dupe. i simply listed another VERY similar question. At the time it had no answer. No harm intended. – Kevin B Aug 23 '15 at 17:28

0 Answers0