DEFINITION
crossws
Universal WebSocket Adapter
Definition
A universal WebSocket adapter that abstracts away runtime-specific WebSocket implementations, enabling the same server code to run on Node.js, Bun, Deno, Cloudflare Workers, and Node with uWebSockets. Replaces Node.js-only ws package in Hocuspocus v4.
Examples in the Wild
- Example 1:Running Hocuspocus on Cloudflare Workers for edge collaboration
- Example 2:Deploying the same server code to Bun and Deno
- Example 3:Edge-native real-time collaboration infrastructure
- Example 4:Multi-runtime WebSocket support without code changes