cable
Define procedures and durable typed channels once, then use them from your server and TypeScript client.
cable is a TypeScript library for procedures and durable typed channels on actor runtimes. Define the API in a shared contract. Your server implements its leaves, and your client calls the same leaves with inferred inputs, outputs, and declared failures.
Start with the small procedure flow, then add an authenticated Cloudflare host and a room channel when the application needs live state.
Start here
- Get started follows one contract from server handler to client call.
- Examples points to the runnable chat application and its source files.
- Define a contract describes global procedures and channel families.
- Implement procedures connects global procedures to server code.
- Use the client calls procedures and opens typed channel handles.
Choose your next guide
- Authorization shows context refinement with public, protected, and admin procedures.
- React adds cable to a React component tree.
- Channels explains channel keys, events, presence, and history.
- Cloudflare Durable Objects runs one channel host per Durable Object.