https://github.com/alloc/hattip-ws
Quickly integrate crossws with Hattip
https://github.com/alloc/hattip-ws
Last synced: 8 months ago
JSON representation
Quickly integrate crossws with Hattip
- Host: GitHub
- URL: https://github.com/alloc/hattip-ws
- Owner: alloc
- License: mit
- Created: 2025-02-17T01:00:58.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-05-13T18:48:42.000Z (9 months ago)
- Last Synced: 2025-06-06T21:41:56.660Z (8 months ago)
- Language: TypeScript
- Size: 105 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# hattip-ws
A lightweight wrapper that helps you integrate `crossws` with [Hattip](https://github.com/hattipjs/hattip).
> [!WARNING]
> This package is unmaintained. Check out [alien-ws](https://github.com/alien-rpc/alien-ws) for a maintained alternative. The difference is which middleware library is used (`@hattip/compose` vs `alien-middleware`). If you wish to maintain this package, let me now and I'll transfer it to you.
## Usage
Follow the instructions for your server:
- [Node.js](https://github.com/alloc/hattip-ws/tree/main/src/adapters/node)
- [Deno](https://github.com/alloc/hattip-ws/tree/main/src/adapters/deno)
- [Cloudflare Workers](https://github.com/alloc/hattip-ws/tree/main/src/adapters/cloudflare-workers)
- [Bun](https://github.com/alloc/hattip-ws/tree/main/src/adapters/bun)
- [UWS](https://github.com/alloc/hattip-ws/tree/main/src/adapters/uwebsockets)
## Framework Usage
If you're building a framework on top of Hattip, you may find the root entry point useful. It contains generalized types for the adapters, so developers can pass an “adapter factory” to the framework.
```ts
import type {
WebSocketAdapterFactory,
WebSocketAdapterOptions,
WebSocketAdapter,
} from 'hattip-ws'
```