Function: MiddlewareMiddleware()
Function: MiddlewareMiddleware()
function MiddlewareMiddleware(context, next): Promise<IBlueprint>;
Middleware to add global and specific middleware to the kernel blueprint.
This middleware processes modules marked as general middleware and associates them with the kernel's configuration in the blueprint.
Parameters
context
BlueprintContext
<IBlueprint
, PipeClass
>
The configuration context containing modules and blueprint.
next
NextPipe
<BlueprintContext
<IBlueprint
, PipeClass
>, IBlueprint
>
The next function in the pipeline.
Returns
Promise
<IBlueprint
>
The updated blueprint.
Example
MiddlewareMiddleware({ modules, blueprint }, next);