DEV Community

Abhay kumar
Abhay kumar

Posted on

Stop waiting for the backend — mock any API in seconds

Frontend devs lose so much time waiting on backend APIs that aren't ready.

The usual "fix" — hand-writing JSON mock files and wiring up routes — just
trades one chore for another, and the mocks drift from reality over time.

A faster pattern: record a real API response once, then replay it from a local
mock server. Your app points at http://127.0.0.1:4010 instead of the real
backend and keeps working — even offline, even when the backend is down.

Great for:
• Building UI before the API exists
• Stable, repeatable test data
• Demos that don't depend on the network
• Avoiding third-party rate limits during dev

I wrote up the record-once/mock-instantly approach (with a short demo):

👉 https://www.orbittest.dev/blog/ghost-mock-server-local-api-mocking

How do you handle "API isn't ready yet" on your team?

Top comments (0)