Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/unjs/crossws

🔌 Cross-platform WebSocket Servers for Node.js, Deno, Bun and Cloudflare Workers.
https://github.com/unjs/crossws

Last synced: 7 days ago
JSON representation

🔌 Cross-platform WebSocket Servers for Node.js, Deno, Bun and Cloudflare Workers.

Awesome Lists containing this project

README

        

# crossws

[![npm version](https://flat.badgen.net/npm/v/crossws)](https://npmjs.com/package/crossws)
[![npm downloads](https://flat.badgen.net/npm/dm/crossws)](https://npmjs.com/package/crossws)

Elegant, typed, and simple toolkit to implement cross-platform WebSocket servers.

👉 [📖 documentation](https://crossws.unjs.io)

## Features

🧩 Seamlessly integrates with [Bun](https://crossws.unjs.io/adapters/bun), [Cloudflare Workers](https://crossws.unjs.io/adapters/cloudflare), [Deno](https://crossws.unjs.io/adapters/deno) and [Node.js](https://crossws.unjs.io/adapters/node) and any compatible web framework.

✅ Prebundled with [ws](https://github.com/websockets/ws) for Node.js support with alternative/much faster [uWebSockets](https://crossws.unjs.io/adapters/node#uwebsockets) adapter.

📦 Extremely lightweight and tree-shakable conditional ESM exports.

🚀 High-performance and simple hooks API, without per-connection callback creation.

🌟 Typed hooks API and developer-friendly object inspection.

[^1]: crossws supports Node.js via [npm:ws](https://github.com/websockets/ws) (prebundled) or [uWebSockets.js](https://github.com/uNetworking/uWebSockets.js).

## Contribution

Local development

- Clone this repository
- Install the latest LTS version of [Node.js](https://nodejs.org/en/)
- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable`
- Install dependencies using `pnpm install`
- Run examples using `pnpm play:` scripts

## License

Published under the [MIT](https://github.com/unjs/crossws/blob/main/LICENSE) license.
Made by [@pi0](https://github.com/pi0) and [community](https://github.com/unjs/crossws/graphs/contributors) 💛





---

_🤖 auto updated with [automd](https://automd.unjs.io)_