-
Notifications
You must be signed in to change notification settings - Fork 148
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
Use Koa instead of Express #107
Comments
Hey there! First of all I love koa and async/await. We also should support all LTS node versions. I think a babel build step would be a bit of an overkill 🤔 What do you think @leontastic? I would definitely love to see this, however I do not have all the time to convert/rewrite the application. |
I'd be down to do most of it, I haven't been too strapped for time.
|
Code is very messy. I want to refactor it myself but I also haven't found the bandwidth to do so. Not opposed to using Koa or Babel at all. I think introducing a build step is a worthy trade-off to allow us to take advantage of next-gen syntax features. As long as we keep the build config simple, so it doesn't introduce maintenance headaches down the road. |
Even if we go the Babel route, I recently realized that it isn't entirely feasible since a large portion of the Koa 2 ecosystem expects Node.js 7.6+, which means that we'd have to choose what dependencies we use carefully. We'd need to depend on versions written for Koa 1.x and we'd only be able to update once Node 6 exits LTS. I think it's reasonable just to write for Koa 1 for now bearing in mind that it will need to be adapted for Koa 2 later. If you do it right it's pretty painless, I've done it for a much larger project than this when it got bumped up to Node 8. |
What parts of koa 2 couldn't we use? Also I think babel would be overkill. |
I just checked and it looks like most of the important ones are safe ( |
Could just use |
Koa supports generator function as a async await replacement. |
|
I've contributed enough to this project to know it decently well and I think it could benefit pretty massively from async/await and Koa's support for processing the response body after middleware is run.
I'm just opening this issue seeking an opinion on potentially including a Babel build pipeline if I were to write for Koa 2. However it looks like Travis is only doing tests for Node >= 6, so Koa 1 would also work fine if we want to avoid Babel. This isn't intended to be just changes for the sake of using newer features; it really should make things a lot more readable and approachable for adding new features such as versioning.
The text was updated successfully, but these errors were encountered: