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
Koa 2 support #4
base: master
Are you sure you want to change the base?
Conversation
@jordansexton I don't really use Koa anymore in my own projects. Did you want to take over this module at all? I'm happy to give you access on GitHub and NPM 😄 |
Sure, thanks! We use this in production, so I'm happy to help maintain as long at least as that's the case. |
What are you working with now, out of curiosity? |
Most people want Express.js used in the project, but in personal projects I've been using https://github.com/serviejs (inspired partially by Koa) because it works seamlessly on any environment (I'm focusing on AWS lambda) and for front-end/back-end (client request libraries can use exactly the same interface - it's partially inspired by my work with Popsicle and will eventually make it's way back there too). I've added you on GitHub and NPM now, it's all yours 😄 Edit: Let me know if there's any issues though. |
On a side note also, just be aware that |
Thank you! I'll check over this PR again before publishing. I didn't know that about the lack of wildcard support. |
And servie looks cool. I haven't seen this yet, I'll check it out. koa-router has some longstanding issues that haven't been fixed in their koa 2/node 7 branch with path prefixes, layering mounted routers, etc. My best options looked to be to continue to use kroute, or try one of the trie-based routers, but the ones with koa integration don't seem well-maintained, so I decided to update things here for now. |
@jordansexton Feel free to merge and release whenever you want to. I can also transfer the github repo to you entirely, if you'd prefer 😄 |
Thanks for the ping! It's not a problem that it's here, I've just been busy with work. I hope to be able to have time to address this soon. I just didn't want to merge and release if an issue arose that I wouldn't be able to troubleshoot quickly! |
I updated everything to use Koa 2's
(ctx, next) =>
middleware signature.async
/await
this
refs tocontext
and fixed args accordinglyvar
withlet
/const
as neededextends.js
(use native Object.assign)async
/await
)engines
to package.json (async
/await
requires >= 7.6.0)