pliant-svc

RESTful service for testing resilience

Usage no npm install needed!

<script type="module">
  import pliantSvc from 'https://cdn.skypack.dev/pliant-svc';
</script>

README

fail4ward-svc

CI

Light weight service used by fail4wardjs for testing failure scenarios. Tested on node v10.

Run locally

Pull from dockerhub and run

docker run --name fail-svc -it ardydedase/fail4ward

Run with docker-compose

  • Checkout this repo.

  • Use docker compose.

      docker-compose up
    

Run with npm

  • Checkout this repo.

  • Install and run:

      npm install
      npm start
    

Usage

Failure scenarios: http://localhost:8000/error Success scenarios: http://localhost:8000/success

  • Delay the response for 5000 milliseconds: http://localhost:8000/fail?timeout=5000
  • Respond with 501 status code: http://localhost:8000/error?status=501
  • Return successul response after 5 error reponses with status code 503: http://localhost:8000/success?after=5&status=503