node.js - nodejs express的一个问题
巴扎黑
巴扎黑 2017-04-17 16:05:07
0
1
369
router.get('/', **function(req, res, next)** {    
    res.send('Hello aumalls s')
  //res.render('index', { title: 'Express' });
});

这后面的回调函数function(req,res,next){}
里面的参数是怎么肯定的,有几个参数,顺度是什么?这个我们怎么知道?

巴扎黑
巴扎黑

reply all(1)
伊谢尔伦

A request object, a response object, and a next (if the function code in the callback is executed, you can enter the next middleware through next, otherwise it will always be in a suspended state), please refer to the official website demo for details

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template