Configure router with middlewares and controllers atomically This MUST be called immediately after RouterService construction and can only be called once.
Array of middleware configuration entries from modules
Array of controller classes from modules
Handle incoming fetch request via Hono
This method is called by the Backend worker's fetch() method. The request-scoped container is created in RequestScopeService.
Incoming Request object
Cloudflare environment bindings
Cloudflare execution context
Response object
RouterService manages HTTP routing and request handling with OpenAPI support
Responsibilities:
Note: Route access control (domain-based enforcement) is handled by RouteAccessMiddleware in the tenancy module, applied via TenancyModule.configure().
The service is registered as a singleton in the DI container and accessed by the Backend worker's fetch() method.