| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
A Cap'n Web API served from a Worker and called from a React app, comparing batched promise pipelining against the same calls made sequentially. Both ends are validated at runtime: @validateRpc() on the server boundary, validateStub() on the client.
Runs as a playground in the docs under Examples, and locally as a real Worker.
From the repo root:
npm run build # the examples resolve `capnweb` to dist/
npx wrangler dev --cwd examples/worker-react --ip 127.0.0.1 --port 8787The rest of this file covers running the pieces individually.
From the repo root:
npm run build
cd examples/worker-react/client
npm install
npm run build
cd ..
npx wrangler dev --config wrangler.jsoncOpen http://127.0.0.1:8787.
For client debugging with Vite, run the Worker from the example directory:
cd examples/worker-react
npx wrangler dev --config wrangler.jsonc --ip 127.0.0.1 --port 8787 --inspector-port 9229In another terminal, run Vite from the repo root:
cd examples/worker-react/client
npm run devThe Vite dev server proxies /api to http://127.0.0.1:8787.
Use the validate: debug all launch configuration, which starts Wrangler and Vite together.
Worker validation output is generated under .wrangler/validate/worker.ts. The React client uses normal Cap'n Web client sessions wrapped explicitly with validateStub().
Set these in wrangler.jsonc:
| Back | FazBrowse Home | New Git URL |