node.js - How to crash a nodejs app programattically (for test) -


i want test nodejs app crash, need process stop, not throw errors. there simple way programattically?

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

thanks!

try this:

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

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -