9 comments

[ 1.8 ms ] story [ 29.7 ms ] thread
I switched from Express to Koa for a few months now and I honestly don’t understand why this doesn’t seem to be the trend. It was a simple transition but everything feels more correct to me, and easier to reason about.
I've been using Koa for a couple of years now. It is a lot better than express in terms of middleware layout and the API.
You'd be surprised at how abstractions are not useful until they really are.

'basic works'.

Especially if it's familiar.

Have been using Koa for a while but I guess Express got its name too famous for any predecessor to take over as JS's web framework even if it means built by the same author.

For one, people pick from number of github stars which is about 40k vs 20k and when you google for node web framework, Express is of course on the first page and Koa is not and for those who read blogs and books from only a few years back, they all talk about Express.

Doesn't Express have a better selection of middleware?
Greenfield project, I wanted Koa but didn’t have a strong argument, my team chose Express because of its dominance. I would still prefer koa.
NestJS is decent API framework that supports Typescript as well.
No idea what is supposed to be better about the controllers classes versus the plain functions. Hopefully TypeScript allows some nice static type checking, but that is not shown here...