Hacker News new | ask | show | jobs
by cantaloa 1153 days ago
I haven't used Express in ten years, but imo `async (req, res, next) => ...` would mainly be attractive if failure was automatically handled and you could `await next()` to post-process the response. Though it would still help you write async code inside that route.

Since iirc you send responses directly from handlers in Express, I'm not sure the latter is possible even with express-promise-router since you basically need downstream routes/middleware to return a Response object rather than send it directly.

I think Express is never going to unify with Koa's direction since it's just too disruptive to Express' ecosystem (the v5.x branch is stale) which is probably for the best.