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

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [Context](./context.context.md) &gt; [configure](./context.context.configure.md)

## Context.configure() method

Create a corresponding binding for configuration of the target bound by the given key in the context.

For example, `ctx.configure('controllers.MyController').to({x: 1})` will create binding `controllers.MyController:$config` with value `{x: 1}`<!-- -->.

**Signature:**

```typescript
configure<ConfigValueType = BoundValue>(key?: BindingAddress): Binding<ConfigValueType>;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td markdown="1">

key


</td><td markdown="1">

[BindingAddress](./context.bindingaddress.md)


</td><td markdown="1">

_(Optional)_ The key for the binding to be configured


</td></tr>
</tbody></table>

**Returns:**

[Binding](./context.binding.md)<!-- -->&lt;ConfigValueType&gt;


