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

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

[Home](./index.md) &gt; [@loopback/express](./express.md) &gt; [asMiddleware](./express.asmiddleware.md)

## asMiddleware() function

Template function for middleware bindings

<b>Signature:</b>

```typescript
export declare function asMiddleware(options?: MiddlewareBindingOptions): BindingTemplate;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  options | [MiddlewareBindingOptions](./express.middlewarebindingoptions.md) | Options to configure the binding |

<b>Returns:</b>

[BindingTemplate](./context.bindingtemplate.md)


