该介绍目前仅提供英文版本。
Overview
y-durableobjects brings real-time collaboration to Cloudflare Workers using Yjs and Durable Objects. It gives you a straightforward way to add scalable, CRDT-based real-time editing to an app.
Requirements
- Hono 4.3 or higher (a peer dependency)
Installation
npm install y-durableobjects hono
Setup
Configure a Durable Object binding and class in your wrangler.toml, then mount the provided Hono route. Each document is backed by its own Durable Object, which holds the shared Yjs state and relays updates between connected clients over WebSockets.