Get started with Rivet Actors in Node.js and Bun
Install RivetKit
Create an Actor
Create a simple counter actor:
Setup Server
Choose your preferred web framework:
The /registry
endpoint is automatically mounted by RivetKit and is required for client communication. When using serve()
with Hono, this is handled automatically.
Run Server
Your server is now running at http://localhost:8080
Test Your Actor
Test your counter actor using HTTP requests:
Deploy
By default, RivetKit stores actor state on the local file system and will not scale in production.
The following providers let you deploy & scale RivetKit:
Rivet provides open-source infrastructure to deploy & scale RivetKit. To deploy to Rivet, provide this config:
And deploy with:
Your endpoint will be available at your Rivet project URL.
Create a type-safe client to connect from your frontend:
See the JavaScript client documentation for more information.