Almost every Express app I see has an app.use statement for middleware but I haven\'t found a clear, concise explanation of what middleware actually is and what
Middleware is a subset of chained functions called by the Express js routing layer before the user-defined handler is invoked. Middleware functions have full access to the request and response objects and can modify either of them.
The middleware chain is always called in the exact order in which it has been defined, so it is vital for you to know exactly what a specific piece of middleware is doing.
Once a middleware function finishes, it calls the next function in the chain by invoking its next argument as function.
After the complete chain gets executed,the user request handler is called.