📜  如何在节点 js 中创建中间件 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:11.453000             🧑  作者: Mango

代码示例1
const requestLogger = (request, response, next) => {
  console.log('Method:', request.method)
  console.log('Path:  ', request.path)
  console.log('Body:  ', request.body)
  console.log('---')
  next()
}