In the express documentation, there is the following example:
app.use('/user/:id', function (req, res, next) {
console.log('Request Type:', req.method)
next()
})
and it explains that the function is executed for any type of HTTP request on the /user/:idpath
. This confuses me as it looks like app.use
does the same work as app.all()
. Are they the same?
In describing app.use, the documentation always uses the terms mount
and path
. Whereas for app.get, the term used is always route
. What do all these mean?