honojs-middleware/packages/node-ws
Rokas Muningis f77d7ba2e2
feat(standard-validator): Add standard schema validation (#887)
* feat(standard-validator): Add standard schema validation

* feat(standard-validator): add changeset

* feat(standard-validator): reintroduce type tests

* feat(standard-validator): simplif tests

* build(standard-validator): add gitlab pipeline

* chore(standard-validator): remove redundant files

* feat(standard-validator): cleanup tests, adjust comments

* fix(standard-validator): adjust versions, fix doc

* build: fix lockfile

* feat(standard-validator): drop headers lower-casing, update readme

* check types in test dir and add `tsc` to the test command
2025-02-06 21:38:36 +09:00
..
src fix(node-ws): allow `Hono` with custom Env for `createNodeWebSocket` (#951) 2025-02-02 21:25:54 +09:00
CHANGELOG.md Version Packages (#953) 2025-02-02 21:30:01 +09:00
README.md feat: Introduce WebSocket helper for Node.js | `@hono/node-ws` (#503) 2024-05-09 21:51:25 +09:00
package.json feat(standard-validator): Add standard schema validation (#887) 2025-02-06 21:38:36 +09:00
tsconfig.json feat: Introduce WebSocket helper for Node.js | `@hono/node-ws` (#503) 2024-05-09 21:51:25 +09:00
vitest.config.ts feat: Introduce WebSocket helper for Node.js | `@hono/node-ws` (#503) 2024-05-09 21:51:25 +09:00

README.md

WebSocket helper for Node.js

A WebSocket helper for Node.js

Usage

import { createNodeWebSocket } from '@hono/node-ws'
import { Hono } from 'hono'
import { serve } from '@hono/node-server'

const app = new Hono()

const { injectWebSocket, upgradeWebSocket } = createNodeWebSocket({ app })

app.get('/ws', upgradeWebSocket((c) => ({
  // https://hono.dev/helpers/websocket
})))

const server = serve(app)
injectWebSocket(server)

Author

Shotaro Nakamura https://github.com/nakasyou

License

MIT