Actor Kit is a library for running state machines in Cloudflare Workers, leveraging XState for robust state management. It provides a framework for ma

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-10-08 18:30:03

Actor Kit is a library for running state machines in Cloudflare Workers, leveraging XState for robust state management. It provides a framework for managing the logic, lifecycle, persistence, synchronization, and access control of actors in a distributed environment.

If you're using Next.js or another external server, set up your ACTOR_KIT_HOST environment variable to point to your deployed Worker's URL.

By following these steps, you'll have a basic Actor Kit setup running on Cloudflare Workers. For more detailed, framework-specific instructions, please refer to our example projects for Next.js and Remix.

These examples showcase how to integrate Actor Kit with different frameworks, demonstrating real-time, event-driven todo lists with owner-based access control. Visit the live demos to see Actor Kit in action!

Returns a function (request: Request, env: Env, ctx: ExecutionContext) => Promise<Response> that handles Actor Kit routing.

Leave a Comment