Hacker News new | ask | show | jobs
by tmh88j 1207 days ago
> If you have to tell a middleware what order it's supposed to run in with relation to other known middlewares, chances are the middleware system itself is a poor design.

That's just the chain of responsibility pattern [1] and I've only seen middleware operate that way. Why wouldn't you want control over the order?

[1] https://refactoring.guru/design-patterns/chain-of-responsibi...