title: Why does my node app process keep getting stopped when I use forever?
body: <p>On a free-tier Amazon EC2 instance, I set up a simple node.js Hello World app running on express.</p>
  
  <p>If I run <code>npm start</code>, my app runs fine and I can hit it from my browser, and I see the following output:</p>
  
  <pre><code>&gt; myappname@0.0.0 start /home/ec2-user/app
  &gt; node ./bin/www
  </code></pre>
  
  <p>I have installed the forever tool globally. When I run <code>forever start app.js</code>, I see:</p>
  
  <pre><code>warn:    --minUptime not set. Defaulting to: 1000ms
  warn:    --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
  info:    Forever processing file: app/app.js
  </code></pre>
  
  <p>However, when I check <code>forever list</code>, I see that the process has stopped:</p>
  
  <pre><code>info:    Forever processes running
  data:        uid  command             script forever pid  id logfile                          uptime  
  data:    [0] 2v0J /usr/local/bin/node app.js 2455    2457    /home/ec2-user/.forever/2v0J.log STOPPED 
  </code></pre>
  
  <p>This is the only message in the log: <code>error: Forever detected script was killed by signal: null</code></p>
  
  <p>I'm unable to find any other log information. Why does it keep immediately stopping?</p>
  
  <p>EDIT: I tried running it as <code>nohup forever start app.js</code> and got the same problem. I'm running the <code>forever start</code> and the <code>forever list</code> in the same ssh session, one after the other. The app's process seems to stop immediately.</p>