**app.use()** handles all the middleware functions.
What is middleware?
Middlewares are the functions that work like a door between two all the routes.
For instance:
***app.use((req, res, next) => {
console.log("middleware ran");
next();
});
app.get("/", (req, res) => {
console.log("Home route");
});***
When you visit / route in your console the two message will be printed. The first message will be from middleware function. If there is no next() function passed then only middleware function runs and other routes are blocked.