Function: RouteDefinitionsMiddleware()
Function: RouteDefinitionsMiddleware()
function RouteDefinitionsMiddleware<IncomingEventType, OutgoingResponseType>(context, next): Promise<IBlueprint>;
Middleware to process and register route definitions from modules.
Type Parameters
IncomingEventType
IncomingEventType
extends IIncomingEvent
OutgoingResponseType
OutgoingResponseType
= unknown
Parameters
context
BlueprintContext
<IBlueprint
, EventHandlerClass
<IncomingEventType
, OutgoingResponseType
>>
The configuration context containing modules and blueprint.
next
NextMiddleware
<BlueprintContext
<IBlueprint
, EventHandlerClass
<IncomingEventType
, OutgoingResponseType
>>, IBlueprint
>
The next pipeline function to continue processing.
Returns
Promise
<IBlueprint
>
The updated blueprint or a promise resolving to it.
Example
RouteDefinitionsMiddleware(context, next)