Constructs a new Bearn application instance.
Optionaloptions: AppOptions = {}The options for the Bearn application.
ReadonlybaseAn optional prefix used when the router is mounted without a specific path.
ReadonlydescriptionAn optional description for the router, useful for documentation or logging.
ReadonlynameAn optional name for the router, useful for identification.
FunctionStops the server if running.
Optionalcallback: (err?: Error) => voidThe callback function to call when the server stops.
Registers a DELETE route with optional middleware and schema.
The path for the route.
The handlers and optional schema for the route.
Registers a GET route with optional middleware and schema.
The path for the route.
The handlers and optional schema for the route.
FunctionRetrieves a list of all registered routes, including those from mounted routers.
An array of all routes.
Registers a HEAD route with optional middleware and schema.
The path for the route.
The handlers and optional schema for the route.
FunctionRegisters a global error handler invoked on uncaught route/middleware errors.
The error handler function to register.
Registers an OPTIONS route with optional middleware and schema.
The path for the route.
The handlers and optional schema for the route.
Registers a PATCH route with optional middleware and schema.
The path for the route.
The handlers and optional schema for the route.
Registers a POST route with optional middleware and schema.
The path for the route.
The handlers and optional schema for the route.
Registers a PUT route with optional middleware and schema.
The path for the route.
The handlers and optional schema for the route.
FunctionRegisters any controllers discovered via decorators. Typically invoked automatically on first request.
FunctionStarts the HTTP server and begins handling requests.
Optionalcallback: (info: ListenInfo) => voidThe callback function to call when the server starts.
The underlying Node Server instance.
BearnApp