Middleware definition with before/after hooks
Optional
Runs after the middleware chain completes
Use for cleanup, logging, or metrics.
Runs before the middleware chain continues
Use for setup, validation, or state preparation.
Middleware definition with before/after hooks