1.0.7 • Published 8 months ago

bun-express-ws v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

bun-express-ws

Fork of wll8's improved express-ws that utilizes Bun's built-in WebSocket implementation. For more information about what's different between wll8's version and the unscoped package please see wll8's readme.

Usage

bun install bun-express-ws
const express = require(`express`)
const expressWs = require(`bun-express-ws`)
const {app, wsRoute} = expressWs(express())

app.ws(`/abc`, (ws, req) => {
  // const {params, query} = req
  ws.send(`abc`)
})
app.get(`/abc`, (req, res) => {
  res.json(`abc`)
})

app.listen(3040)
  • For more examples see the file: test.js

License

MIT

Copyright (c) 2023-present, hugeblank

1.0.7

8 months ago

1.0.6

8 months ago

1.0.5

8 months ago