I'm trying to implement multiple middle-ware for each routes and it works fine
1.This is how i'm doing
var auth = require('utility/auth');
app.get('*', auth.checkAccess(), auth.checkLogin(),function(){
});
app.get('/myaccount',auth.checkAccess(),auth.checkLogin(),auth.myAccountCheck(),function(){
});
app.get('/mylist',auth.checkAccess(),auth.checkLogin(),auth.myListCheck(),function(){
});
2.This is another approach i want to try.
var auth = require('utility/auth');
app.get('*', auth.checkAccess(), auth.checkLogin(),function(){
});
app.get('/myaccount', auth.myAccountCheck(), function(){
});
app.get('/mylist',auth.myListCheck(),function(){
});
Is both approaches are same ?
If i'm adding a new middleware do i need to update all routers or just
app.get("*") alone?