Open marswong opened 4 years ago
I think middleware for sub router is a better choice? #14
I think middleware for sub router is a better choice? #14
yup, sub router is a good choice for simple router, but what if we need different pre-process logic for the same-level sub router?
currently we could only apply global middlewares, in complicated applications, we might need to apply middlewares for different business, assume there are routes (
/foo
and '/bar') and middlewares (foo
andbar
), the usage could be: