In the docs for the NodeJS express module, the example code has app.use(...).
app.use(...)
What is the use function and where is it defined?
use
app.use() acts as a middleware in express apps. Unlike app.get() and app.post() or so, you actually can use app.use() without specifying the request URL. In such a case what it does is, it gets executed every time no matter what URL's been hit.