Files
Peter Meier b122de518c feat: mockly-hono — file-based mock API server (Hono)
File path = route. JSON/JSON5, dynamic .ts handlers + faker, templating,
stateful CRUD (pagination/sort/persist), __variants, sequence, chaos,
rate-limit, auth, validation, per-route + global proxy/record, splat routes,
X-Scenario overlays, SSE. Visual docs (Scalar) at /__docs from a live
OpenAPI 3 spec. OpenAPI import script. Zero-build via tsx.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 12:44:31 +02:00

20 lines
657 B
Bash

# server port (3000 collides with RustyCMS in this workspace -> 4100)
PORT=4100
# default response delay (ms) when a route sets none
REQUEST_DELAY=0
# gzip/deflate responses
COMPRESS=true
# CORS allow-origin ( * or https://app.example.com )
CORS_ORIGIN=*
# override routes directory (default ./routes)
# ROUTES_DIR=./routes
# chaos engineering: fraction of requests that fail (0 = off)
CHAOS_RATE=0
CHAOS_STATUS=500
# proxy unmatched requests to a real upstream ( empty = off )
PROXY_TARGET=
# when proxying, save upstream json responses as mock files
RECORD=false
# persist CRUD mutations back to the *.crud.json seed file (survives restart)
PERSIST=false