Skip to content

Getting Started

Terminal window
npm install -g @bvbmz/local-proxy

Or run instantly with npx:

Terminal window
npx @bvbmz/local-proxy --target https://api.example.com
Terminal window
# 1) scaffold config
local-proxy --init
# 2) run proxy
local-proxy --target https://api.example.com
  • Port: 5050
  • API prefix: /api
  • Scenarios file: ./scenarios.json

Point your frontend to:

Terminal window
http://localhost:5050/api
  1. Install @bvbmz/local-proxy.
  2. Run local-proxy --init to generate scenarios.json.
  3. Start with local-proxy --target <your-api-url>.
  4. Switch active_scenario values in scenarios.json while developing.

You can configure runtime with env vars:

  • TARGET
  • PORT
  • API_PREFIX

CLI flags take precedence over env vars.

Want realistic mocks?

Check Scenarios and start using fixture files.