Interface IRouteConfig

Configuration options for defining routes in Febby.

Example

const routeConfig: IRouteConfig = {
method: "get",
path: "/users",
middlewares: [authMiddleware],
handler: getUserHandler
};

Hierarchy

  • IRouteConfig

Properties

bodySchema?: any

Schema for validating the request body.

handler: Handler

The request handler function for this route.

method: HttpMethod

HTTP method for the route (e.g., 'get', 'post').

middlewares?: Handler[]

Middleware functions to apply to this route.

path: string

The URL path for the route.

router?: Router

Optional Express router to use for routes.

Generated using TypeDoc