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 | Express middleware config |
| options | MiddlewareInterceptorBindingOptions | Options for registration |
Returns: