Skip to main content

Going Deaper

📄️ Middleware

Just like any other web frameworks, Pashmak supports middlewares. Middlewares are pieces of code that wrap execution of controller methods. They can be used for various purposes such as authentication, logging, request modification, response modification, etc. Middlewares are functions, objects, or classes that can execute with direct access to the request and response objects. The main distinction between middlewares in Pashmak vs nestjs or express is that middlewares can execute code before AND after the controller method.