@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
73 lines (39 loc) • 1.25 kB
Markdown
---
lang: en
title: 'API docs: context.binding.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.binding.configure.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/context](./context.md) > [Binding](./context.binding.md) > [configure](./context.binding.configure.md)
## Binding.configure() method
Create a configuration binding for the given key
**Signature:**
```typescript
static configure<V = unknown>(key: BindingAddress): Binding<V>;
```
## 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">
Key for the binding to be configured
</td></tr>
</tbody></table>
**Returns:**
[Binding](./context.binding.md)<!-- --><V>
## Example
```ts
const configBinding = Binding.configure('servers.RestServer.server1')
.to({port: 3000});
```