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

apache - Cloudflare bug random 302 redirections -

java - Sql binding in Spring throws org.skife.jdbi.v2.exceptions.UnableToExecuteStatementException -