title: Getting a node.js process to die?
body: <p>I'm trying to find the most elegant way for my node.js app to die when something happens. In my particular case, I have a config file with certain require parameters that have to be met before the server can start and be properly configured.</p>
  
  <p>One way I have found to do this is:</p>
  
  <pre><code>var die = function(msg){
      console.log(msg)
      process.exit(1);
  } 
  
  die('Test end');
  </code></pre>
  
  <p>Is there a better way to handle this kind of situation?</p>