1
我被建議使用compose-middleware模塊有一箇中間件陣列。 然後我注意到這工作得很好用express.js:中間件陣列和組合中間件之間的區別?
router.post('/editPassword', doAction);
var doAction = [
function(req, res, next){
//whatever
next();
},
function(req, res, next){
//whatever
}
]
什麼是使用合成中間件則主要優勢在哪裏?