0

I use Digitalocean to deploy my node.js app. I manage to setup everything but I have issue when I come back for the second time. Here's what I've done today :

  1. ssh login using terminal (I'm on mac)
  2. go to my app directory and do nodemon, server started
  3. check my site and it's live.
  4. close my terminal.

later on I come back (means I relog in to my terminal), and I don't see my node process. What is going on?

Rachel
  • 31
  • 5
  • If you run something normally in your terminal, it becomes a child process of the terminal process. So, if the terminal is killed, then the child is killed. You need to run it as it's own background process so it's not a child of the terminal. – jfriend00 Jul 03 '16 at 16:29

1 Answers1

0

When you terminate your session by exiting you stop your nodemon process. Use something like pm2 to manage your processes. https://github.com/Unitech/pm2

martwetzels
  • 437
  • 5
  • 19