Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to create middlewares in node js

const requestLogger = (request, response, next) => {
  console.log('Method:', request.method)
  console.log('Path:  ', request.path)
  console.log('Body:  ', request.body)
  console.log('---')
  next()
}
Source by fullstackopen.com #
 
PREVIOUS NEXT
Tagged: #create #middlewares #node #js
ADD COMMENT
Topic
Name
6+1 =