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
Post a Comment