chaos-donkey

2.0.2 • Public • Published

chaos-donkey

Introduction

Single page applications make extensive use of xhr requests. However, as developers, we often don't check for scenarios that involve non-200 responses. Thus, we deploy our SPAs expecting the best, until we're notified that our beautiful app is breaking in production.

chaos-donkey is a reverse-proxy that returns non-200 responses for your xhr requests. It allows you to see how your application will perform when things go wrong.

Installation

npm i -g chaos-donkey

Usage

> chaos-donkey <configuration yaml>
 
example:
> chaos-donkey ./fixtures/mean-todomvc.yml

The configuration yaml is a file that contains the following:

# This is your SPA 
origin: mean-todomvc.herokuapp.com
 
xhr:
 path: /path/to/your/endpoint
   # List the possible status codes you want your application to return 
   # If you don't specify this, it will return these status codes: 200, 403, 404, 500, 503 
   statusCodes:
     - 200
     - 500

See other examples in the fixtures folder.

Package Sidebar

Install

npm i chaos-donkey

Weekly Downloads

0

Version

2.0.2

License

MIT

Last publish

Collaborators

  • paolodm