Quickstart
Node.js & Bun Quickstart
Get started with Rivet Actors in Node.js and Bun
Install Rivet
Command Line
Create an Actor
Create a simple counter actor:
registry.ts
Setup Server
Choose your preferred web framework:
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. To scale Rivet in production, follow a guide to deploy to a hosting provider or integrate a driver:
Hosting Providers
Railway
Deploy Rivet applications with Railway's platform-as-a-service
Cloudflare Workers
Run Rivet actors on Cloudflare's edge computing platform
Rivet Cloud (Enterprise)
Managed Rivet hosting with enterprise features and support
Drivers
Configuration Options
Connect Frontend To The Rivet Actor
Create a type-safe client to connect from your frontend:
client.ts
See the JavaScript client documentation for more information.