Use --target in every run
--target is required unless you are running only --init.
local-proxy [options] # typical development command local-proxy --target https://api.example.com --port 5050| Option | Description | Default |
|---|---|---|
-t, --target <url> | Upstream API URL | Required unless --init |
-p, --port <number> | Port to listen on | 5050 |
-a, --api-prefix <path> | API path prefix | /api |
-s, --scenarios <file> | Scenarios config file path | ./scenarios.json |
--init | Create a scenarios.json template | - |
-h, --help | Show help | - |
-V, --version | Show version | - |
# basiclocal-proxy --target https://api.example.com# custom port and scenarios filelocal-proxy --target https://api.example.com --port 3000 --scenarios ./mocks/scenarios.json# custom API prefixlocal-proxy --target https://api.example.com --api-prefix /backendUse --target in every run
--target is required unless you are running only --init.
Use --scenarios for project layouts
Keep mocks in a dedicated folder like ./mocks/scenarios.json.
Use --api-prefix to align with app calls
If your app calls /backend/*, set --api-prefix /backend.