Closed kerim1 closed 6 years ago
I experimented a litte bit with koa. Both frameworks seemed to be okay for me.
The only thing I noticed with koajs was the following:
ctx.body is not set until after the response has been sent. The code doesn't tell Koa to wait for the database to return the record.
No problem, but a little bit mirgration work. But if you think it is worth feel free to migrate it.
As can be seen in the iish branch, Express had been replaced with koa. The thing about ctx.body
not set is not understanding how async/await works. So, this has nothing to do with the framework itself.
I was wondering why you decided to go with Express as the web framework? I'm wondering if koa is not a better choice, as it's minimalistic design fits the project much better? It has a cleaner, more up-to-date API (like async-await support) and is much faster as it doesn't bring along the bulk of code and middleware we are not going to use anyway.
If you are ok with it, I could refactor the code to koa instead of express in a separate branch and then compare the result? It shouldn't be too hard, as much of the setup is still the same though.