- Definition: Middleware functions execute during the request-response cycle, allowing you to handle tasks like authentication, logging, and more.
- Creating Middleware: Use the
adonis make:middleware
command to create custom middleware. Register middleware instart/kernel.ts
orstart/kernel.js
.
Leave a Reply