---
lang: en
title: 'API docs: express.createmiddlewarebinding'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/express
permalink: /doc/en/lb4/apidocs.express.createmiddlewarebinding.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/express](./express.md) &gt; [createMiddlewareBinding](./express.createmiddlewarebinding.md)

## createMiddlewareBinding() function

Create a binding for the middleware provider class

<b>Signature:</b>

```typescript
export declare function createMiddlewareBinding(middlewareProviderClass: Constructor<Provider<Middleware>>, options?: MiddlewareBindingOptions): Binding<Middleware>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  middlewareProviderClass | [Constructor](./context.constructor.md)<!-- -->&lt;[Provider](./context.provider.md)<!-- -->&lt;[Middleware](./express.middleware.md)<!-- -->&gt;&gt; | Middleware provider class |
|  options | [MiddlewareBindingOptions](./express.middlewarebindingoptions.md) | <i>(Optional)</i> Options to create middleware binding |

<b>Returns:</b>

[Binding](./context.binding.md)<!-- -->&lt;[Middleware](./express.middleware.md)<!-- -->&gt;


