kudos/koa-websocket

Update to ws 6.0.0

Closed this issue · 5 comments

ws is now up to version 6.0, but koa-websocket still depends on 5.2.

@lfairy don't use this lib, use pure ws.

const WebSocketServer = require('ws').Server;
const Koa = require('koa');

const app = new Koa();
const server = app.listen(process.env.PORT);
const ws = new WebSocketServer({ server });

@gentlee that's a teensy bit contrived. there's a lot of heavy lifting that this lib tackles that will have to be re-implemented by using ws directly.

Well that's simply not true.

@gentlee Did you write something better? Or should I take your comment with a pinch of salt?

@gentlee comment saved my day because I needed to access to WebSocketServer instance directly and this lib does not expose it.