Open henrymcl opened 5 years ago
have you find a way to use koa-router with websocket
Read the code and see how to parse options to socket.io it is only one file
/**
* Options to pass when instantiating socket.io
* @type <Object>
* @default {}
*/
ioOptions: {}
After switching to koa-socket-2, I don't think I have any way to set up CORS as I cannot
io.set('origins', options.frontEnd);
withconst io = new IO();
app.io, app._io are also not accessible as prompted by TypeScript:
Full Code: