Subtrace has experimental support for developers on macOS.
1

Start backend

Start your backend server on port 8000:
npm run dev
2

Start Subtrace

In a second terminal window, install Subtrace and start the proxy:
curl -fsSL https://subtrace.dev/install.sh | sh

# starts listening on 9000 and proxies requests to 8000
subtrace proxy 9000:8000
3

Update frontend

Configure your frontend to send all backend requests to localhost:9000 instead:
const API_URL = 'http://localhost:8000'
const API_URL = 'http://localhost:9000'

fetch(`${API_URL}/api/users`)
  .then(res => res.json())
  .then(data => setUsers(data))
4

See requests

Open the subt.link URL in your browser to watch every request happening in realtime: