top | item 40219059

(no title)

rrishi | 1 year ago

Where does this version of express put it against its competitors (Koa, Fastify, Hono etc)?

discuss

order

pcthrowaway|1 year ago

Koa hasn't really been a thing since async/await came to JS and addressed most if not all of the pain points in Express that Koa initially was created to alleviate (the pyramid of doom being the main one).

It seems like there is still occasional work there, but it seems more like bare minimum bugfixes and docs improvements. I've maybe seen one company using Koa in the last 5 years.

Fastify would be the closest modern framework, but it's a significant departure from both Express and Koa, taking the convention over configuration approach, but it's not batteries-included.

mattwad|1 year ago

What are you talking about WRT Koa? Express 4 does not support async/await natively in its middleware. That means if your async method throws an error, you need to catch it and return it yourself or else it will just crash the app. That's one reason why I currently use Koa. Express 5 finally supports async/await and it is only now being officially released.

rrishi|1 year ago

Thanks for the reply.

Curious to know if express v5 would qualify as a "modern" framework (like fastify)?

WirelessGigabit|1 year ago

And hapi! I remember switching to that one from express. Learning it was written by WalMart kinda confused me at first.