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

ruby - How do I merge two hashes into a hash of arrays? -

c++ - Do gcc's __float128 floating point numbers take the current rounding mode into account? -