RustMock 0.3.3

Lightning-fast, lightweight API mock server with OpenAPI support and beautiful React dashboard
Documentation
# =============================================================================
# RustMock - Environment Configuration
# =============================================================================
#
# Copy this file to .env to use these environment variables
# Note: CLI arguments override environment variables
#
# Usage: cp .env.example .env

# -----------------------------------------------------------------------------
# OpenAPI Configuration
# -----------------------------------------------------------------------------
# Path to your OpenAPI 3.0 specification file
# When set, endpoints from this spec will be automatically loaded at startup
#
# Example:
#   OPENAPI_FILE=/path/to/openapi.json
#   OPENAPI_FILE=./specs/my-api.json
#
OPENAPI_FILE=

# -----------------------------------------------------------------------------
# Smart Proxy Mode - Default Proxy URL
# -----------------------------------------------------------------------------
# Default proxy URL for unmocked endpoints
# 
# When configured, all requests to endpoints that are NOT mocked will be
# automatically forwarded to this URL. This enables hybrid testing where
# you can mock specific endpoints while using real API responses for others.
#
# Use Cases:
#   • Test new endpoints while keeping production data for stable endpoints
#   • Simulate errors on specific endpoints without affecting the rest
#   • Debug issues with real API data while mocking flaky endpoints
#   • Multi-environment testing (e.g., staging auth + production payments)
#
# Examples:
#   DEFAULT_PROXY_URL=https://api.production.com
#   DEFAULT_PROXY_URL=https://staging-api.example.com
#   DEFAULT_PROXY_URL=http://localhost:3000
#
# Note: You can also set/change this at runtime via the UI Settings page
#       or using the API: POST /__mock/proxy
#
DEFAULT_PROXY_URL=

# -----------------------------------------------------------------------------
# Server Configuration
# -----------------------------------------------------------------------------
# These settings must be configured via CLI arguments:
#
#   ./RustMock --host 0.0.0.0 --port 8090 --default-proxy-url <URL>
#
# Available CLI options:
#   --host              Server host address (default: 0.0.0.0)
#   --port              Server port (default: 8090)  
#   --default-proxy-url Default proxy URL (overrides DEFAULT_PROXY_URL env)
#
# Example:
#   ./RustMock --host 127.0.0.1 --port 3000

# -----------------------------------------------------------------------------
# Docker Usage
# -----------------------------------------------------------------------------
# When using Docker, pass environment variables with -e flag:
#
#   docker run -p 8090:8090 \
#     -e DEFAULT_PROXY_URL=https://api.production.com \
#     -e OPENAPI_FILE=/app/openapi.json \
#     -v $(pwd)/openapi.json:/app/openapi.json \
#     ghcr.io/arthurkowalsky/rust-mock:latest
#
# Or use docker-compose.yaml with env_file:
#   env_file:
#     - .env