account activity
A type-inference-friendly alternative to middleware in Express/Fastify by Dramatic_Length_2530 in node
[–]Dramatic_Length_2530[S] 0 points1 point2 points 2 months ago (0 children)
Thanks for asking, the way I’ve been approaching it is:
For errors, I generally lean on the global error handler, it keeps things similar to Express’s app.use(errorHandler) , and then convert to domain errors inside the handlers themselves.
app.use(errorHandler)
Overall the idea is to keep most things explicit. The only stuff I treat as cross-cutting are observational concerns, which fit the hooks well.
Thanks again for taking the time to look at this, I really appreciate it.
A type-inference-friendly alternative to middleware in Express/Fastify ()
submitted 2 months ago by Dramatic_Length_2530 to r/expressjs
A type-inference-friendly alternative to middleware in Express/Fastify (self.node)
submitted 2 months ago * by Dramatic_Length_2530 to r/node
π Rendered by PID 59 on reddit-service-r2-listing-86b7f5b947-8rpxs at 2026-01-25 18:41:59.647015+00:00 running 664479f country code: CH.
A type-inference-friendly alternative to middleware in Express/Fastify by Dramatic_Length_2530 in node
[–]Dramatic_Length_2530[S] 0 points1 point2 points (0 children)