Node.js & Bun
The ActorCore JavaScript client allows you to connect to and interact with actors from browser and Node.js applications.
ActorCore is still pre-v1.0. Please help us by report bugs on GitHub Issues!
Quickstart
Create a new Node.js project
Create a new Node.js project with TypeScript support:
Install ActorCore packages
Install the ActorCore client and Node.js platform packages:
Define your actor
Create a file actors/app.ts
in your project with your actor definition:
Create your client
Create a file src/client.ts
in your project to connect to your actor:
Start your ActorCore development server
Launch the development server with:
This will automatically start your app and open the studio in your browser. The studio supports hot-reloading, state inspection, visual RPC testing, and more debugging tools.
Run your client
In a separate terminal, run your client code:
You should see output like:
Run it again to see the state update.
Deploy your ActorCore app
Now that you have your project running, deploy your application to one of these platforms:
Next Steps
See the Interacting with Actors documentation for information on how to use the client.