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

Python Kivy ListView: How to delete selected ListItemButton? -

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