-
Notifications
You must be signed in to change notification settings - Fork 37
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
Adds a next branch that makes koa-websocket work with koa-router 7.x #18
Conversation
Hrm... I couldn't figure out how to open this PR to |
Thanks! I'll push a pre-release 3.0.0 bump to npm for this shortly. |
@kudos Thanks! |
awesome! been waiting for this for a couple of months. |
I still only see 2.1.1 on npm. Did you ever push this pre-release to npm? |
@chovy it's tagged |
Gotcha. Thanks. I figured npm page would have shown an I think koa is waiting for async/await to not need a flag before it becomes stable. Probably April from what I hear. |
As of Node 7.6, a flag is not needed for async/await, and Koa now ships v2 as the @latest when installing. |
With above dependencies, websocket router is still not working.
|
Same for me. |
@lennerd Above snippets work for me. |
Yes, I was able to get it working, too. Had problems with |
This PR resolves issue #14. The root cause of the incompatibility appears to be koa-router 7.x using a newer version of koa-compose that doesn't function the same. I upgraded koa-compose and changed how the result of the composition was called -- it looks like explicit context passing instead of binding the context is the newer approach?
Because I couldn't seem to maintain koa 1.x compatibility, I guessed this should be a
next
kind of thing for koa-websocket.