In the docs for the NodeJS express module, the example code has app.use(...).
What is the use function and where is it defined?
app.use is woks as middleware for app request. syntax
app.use('pass request format',function which contain request response onject)
example
app.use('/',funtion(req,res){
console.log(all request pass through it);
// here u can check your authentication and other activities.
})
also you can use it in case of routing your request.
app.use('/', roting_object);