examples/chat-room-render/README.md
Note: This is the Render-optimized version of the chat-room example. It adds a production HTTP server, Vite build, and a
render.yamlBlueprint for deploying to Render.
Example project demonstrating real-time messaging and actor state management.
git clone https://github.com/rivet-dev/rivet.git
cd rivet/examples/chat-room
npm install
npm run dev
The chat room demonstrates core Rivet Actor patterns for real-time communication:
src/actors.ts): chatRoom actor with persistent message history and newMessage broadcast eventssrc/server.ts): Hono app routing /api/rivet/* to the registry handlerfrontend/app/App.tsx): useActor hook with real-time event subscriptionsexamples/chat-room-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