What is a Middleware?
A Middleware is like a layer between the transport and the application layer.
A Middleware can fulfill services like handling exceptions that were not caught before and routing, and alot of other things that you may want to be done, before a request reaches the app or after the request has left the app itsself.
It can do things like pre-parsing request bodies on every request, instead of having to do that on each individual endpoint.
Its generally useful for executing things on every single request. Instead of doing it on each action or endpoint individually