I just released a small library to put some troubles in my Node.JS Express applications.

How to use it ?

Add the dependency to the project.

npm add express-chaos-middleware

Then load the module in the express application :

const { chaos } = require('express-chaos-middleware');


After that the chaos module will be triggered on every route call and goes randomly:

  • slow down the application
  • return http errors
  • throw exceptions

Probabilities of having issues and the randomly triggered effects can be configured with the input param object ((see documentation))[]


Here are some results of library effects observable with a Grafana dashboard.

monitoring monitoring