examples/hello-world-render/README.md
Note: This is the Render-optimized version of the hello-world example. It adds a production HTTP server, Vite build, and a
render.yamlBlueprint for deploying to Render.
A minimal example demonstrating RivetKit with a real-time counter shared across multiple clients, deployed on Render with Rivet Cloud.
@rivetkit/react for seamless React hooks integrationThis example demonstrates the core RivetKit concepts with a simple counter:
src/rivet/counter.ts): Counter actor with persistent state and broadcast eventssrc/http/server.ts): Production HTTP server that serves the built client and forwards /api/rivet/* to the registry handlerfrontend/app/App.tsx): Counter component using useActor hook and event subscriptionsexamples/hello-world-render if deploying from the monorepo.| Variable | Description |
|---|---|
RIVET_ENDPOINT | Backend endpoint URL from your Rivet Cloud project |
RIVET_PUBLIC_ENDPOINT | Public endpoint URL from your Rivet Cloud project |
RIVET_ENVOY_VERSIONis automatically derived from Render'sRENDER_GIT_COMMIT— no manual bump needed per deploy. Set it explicitly to override.
MIT