How to crash a nodejs app programattically (for test)

I want to test a nodejs app crash, need the process stop, not just throw some errors. is there a simple way to do it programattically?

app.get('/crash', function() {
  //do something to crash it 
})

thanks!

Try this:

app.get('/crash', function() {
  process.nextTick(function () {
    throw new Error;
  });
})