Skip to content

Mock Server Implementation#4

Open
dagimene wants to merge 1 commit intowebflow:mainfrom
dagimene:mock-server
Open

Mock Server Implementation#4
dagimene wants to merge 1 commit intowebflow:mainfrom
dagimene:mock-server

Conversation

@dagimene
Copy link
Copy Markdown

@dagimene dagimene commented Mar 31, 2026

Adds a service worker that captures all outgoing /api/* requests, and connects back to the main thread via a MessageChannel. With this architecture, the API implementations run in the browser, and yet all requests can be inspected in the network tab.

Check the latest interview challenges to try it out.

Adds a service worker that captures all outgoing `/api/*` requests, and connects back to the main thread via a MessageChannel. That way, code running in the browser can implement the APIs. All requests can be inspected in the network tab.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant