-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace express-ws with something newer? #200
Comments
Happy to change to it something else, open to suggestions on this one! |
@PepsRyuu I'm currently working on a library similar to express-ws... expect a PR soon :D (fyi this issue was created in case someone will suggest anything better than express-ws) |
I propose tinyws as a replacement. It's much smaller than express-ws, easier to use and comes with types out of the box (also doesn't depend on any framework but not that important here). import express from 'express'
import { tinyws } from 'tinyws'
const app = express()
app.use('/', tinyws())
app.use('/hmr', async (req, res) => {
if (req.ws) {
const ws = await req.ws()
return ws.send('hello there')
} else {
res.send('Hello from HTTP!')
}
})
app.listen(3000) |
Removed |
@PepsRyuu amazing, thanks :D |
Hi,
sorry for writing here again, this is mroe like a suggestion rather than a question or bug report.
so, nollup uses express-ws. that library is ancient as hell (hasn't been updated for 3 years) and is full of unsolved issues.
see this thread: HenningM/express-ws#135
would it be better to replace express-ws with something newer?
The text was updated successfully, but these errors were encountered: