| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 个月前 | ||
| 3 个月前 | ||
| 3 个月前 | ||
| 3 个月前 | ||
| 3 个月前 | ||
| 3 个月前 | ||
| 3 个月前 | ||
| 3 个月前 |
Hello World - Cloudflare Workers
A minimal Rivet Actor counter running on Cloudflare Workers with the WebAssembly runtime.
Getting Started
git clone https://github.com/rivet-dev/rivet.git
cd rivet/examples/hello-world-cloudflare-workers
npm install
npm run dev
rivet dev runs a local Rivet engine and spawns wrangler dev for you.
Implementation
The Worker exports createHandler from @rivetkit/cloudflare-workers, which wires the WebAssembly runtime and serves the Rivet handler. No configuration is required in local dev: the engine endpoint defaults to http://localhost:6420. To target a remote engine in production, set RIVET_ENDPOINT as a Worker variable or secret.
- Worker entry (
src/index.ts): Counter actor andcreateHandler.
Resources
Read more about actions and state, or follow the Cloudflare Workers Quickstart and deploy guide.
License
MIT