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

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/express](./express.md) &gt; [MiddlewareCreationOptions](./express.middlewarecreationoptions.md)

## MiddlewareCreationOptions interface

Options for defining a middleware

<b>Signature:</b>

```typescript
export interface MiddlewareCreationOptions 
```

## Properties

|  Property | Type | Description |
|  --- | --- | --- |
|  [injectConfiguration?](./express.middlewarecreationoptions.injectconfiguration.md) | boolean \| 'watch' | <i>(Optional)</i> A flag to control if configuration for the middleware can be injected lazily.<!-- -->- <code>true</code> (default): creates a provider class with <code>@config</code> - <code>false</code>: No configuration injection is supported - 'watch': creates a provider class with <code>@config.view</code> |
|  [providerClassName?](./express.middlewarecreationoptions.providerclassname.md) | string | <i>(Optional)</i> Class name for the created provider class. It's only used if <code>injectConfiguration</code> is not set to <code>false</code>. |


