title: What determines whether a Node.js app is kept running?
body: <p>What determines whether a Node.js app is kept running?</p>
  
  <p>When the code is something like this:</p>
  
  <pre><code>console.log('Hello World');
  </code></pre>
  
  <p>This phrase will be printed and the app will immediately exit.</p>
  
  <p>But sometimes when we have something like a web server that is listening it keeps working.</p>
  
  <p>What is the general rule that determines whether the app will keep running or not? Is it something related to the event loop or something like that?</p>