Middleware functions are a common concept in modern web development. A middleware function is one that has access to both the request and response objects in an application and can run the subsequent middleware after it is processed.
Middleware creation and registration in Koa is straightforward and is one of the reasons the framework is so widely adopted.