Is it possible to select/define which server middlewares should be run on a specific server route?
For example I have a collection of routes under
/server/api/user
and I need all of them to run /server/middleware/auth.ts
.
How do you go about it?3 Replies
Would something like this work?
@Alireza check this example out https://github.com/insidewebdev/twitter-clone/blob/master/server/middleware/auth.js
Thanks @Cake