Page Contents
Home > @loopback/express > registerExpressMiddlewareInterceptor
registerExpressMiddlewareInterceptor() function
Bind a middleware interceptor to the given context
Signature:
export declare function registerExpressMiddlewareInterceptor<CFG>(ctx: Context, middlewareFactory: ExpressMiddlewareFactory<CFG>, middlewareConfig?: CFG, options?: MiddlewareInterceptorBindingOptions): Binding<GenericInterceptor<InvocationContext>>;
Parameters
Parameter | Type | Description |
---|---|---|
ctx | Context | Context object |
middlewareFactory | ExpressMiddlewareFactory<CFG> | Express middleware factory function |
middlewareConfig | CFG | (Optional) Express middleware config |
options | MiddlewareInterceptorBindingOptions | (Optional) Options for registration |
Returns: