Node.js & Bun Quickstart
Get started with Rivet Actors in Node.js and Bun
Install Rivet
Create an Actor
Create a simple counter actor:
Setup Server
Choose your preferred web framework:
Info
The /registry
endpoint is automatically mounted by Rivet 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, Rivet stores actor state on the local file system and will not scale in production.
The following providers let you deploy & scale Rivet:
For production with Redis storage, install the Redis driver:
Then configure the driver:
Your backend can now be deployed to your cloud provider of choice.
Configuration Options
Connect Frontend To The Rivet Actor
Create a type-safe client to connect from your frontend:
See the JavaScript client documentation for more information.