How to crash my Node app on purpose?

Viewed 13654

I've been working on a deployment work flow with Dokku and Docker and now I want to take care of continuity of my app (along the lines of Forever). To test it, I need a way to deliberately crash my app.

I created a new route '/crashme' with a function that is supposed to wreck my app.

Haven't found a way that worked locally with node/nodemon so far, I've tried:

  • Division by zero
  • Throw a new user exception
  • Referencing a variable that doesn't exist

None of those things crash the app to a point where it needs to be restarted.

Just how can I bring it down?

4 Answers
Related