Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 730 Bytes

File metadata and controls

35 lines (25 loc) · 730 Bytes

Examples

This page collects practical ways to run Chaos Proxy.

Example Sources

Route-Specific Example

target: "http://localhost:4000"
port: 5000
global:
  - latency: 50
routes:
  "GET /users/:id":
    - failNth:
        n: 3
        status: 500
        body: "Every third request fails"

Runtime Reload Example

See hot-reload.md for the full endpoint reference and curl examples.

Preset Example

npx chaos-proxy --config presets/mobile-3g.yaml

To combine presets, merge their global arrays into one config file and keep middleware in intended execution order.