@loopback/docs
Version:
Documentation for LoopBack 4
43 lines (26 loc) • 923 B
Markdown
lang: en
title: 'API docs: context.binding.configure'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
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
<b>Signature:</b>
```typescript
static configure<T = unknown>(key: BindingAddress): Binding<T>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| key | <code>BindingAddress</code> | Key for the binding to be configured |
<b>Returns:</b>
`Binding<T>`
## Example
```ts
const configBinding = Binding.configure('servers.RestServer.server1')
.to({port: 3000});
```