Represents a route definition for mapping HTTP requests in an application.
This interface is used to define the essential properties for a route,
including its path, HTTP method, associated middlewares, and the method
name in the application's controller or handler that will execute when the route is accessed.
The path property specifies the URL path for the route.
The requestMethod defines the HTTP method like GET, POST, DELETE, OPTIONS, or PUT.
The middlewares are an array of functions that will be executed before the main route handler.
The methodName indicates the name of the method in the controller that will handle the request.
Represents a route definition for mapping HTTP requests in an application.
This interface is used to define the essential properties for a route, including its path, HTTP method, associated middlewares, and the method name in the application's controller or handler that will execute when the route is accessed.
The
path
property specifies the URL path for the route. TherequestMethod
defines the HTTP method like GET, POST, DELETE, OPTIONS, or PUT. Themiddlewares
are an array of functions that will be executed before the main route handler. ThemethodName
indicates the name of the method in the controller that will handle the request.