@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
37 lines (24 loc) • 1.33 kB
Markdown
---
lang: en
title: 'API docs: context.context.getconfig'
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.getconfig.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/context](./context.md) > [Context](./context.context.md) > [getConfig](./context.context.getconfig.md)
## Context.getConfig() method
Resolve configuration for the binding by key
<b>Signature:</b>
```typescript
getConfig<ConfigValueType>(key: BindingAddress, propertyPath?: string, resolutionOptions?: ResolutionOptions): Promise<ConfigValueType | undefined>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| key | [BindingAddress](./context.bindingaddress.md) | Binding key |
| propertyPath | string | Property path for the option. For example, <code>x.y</code> requests for <code><config>.x.y</code>. If not set, the <code><config></code> object will be returned. |
| resolutionOptions | [ResolutionOptions](./context.resolutionoptions.md) | Options for the resolution. |
<b>Returns:</b>
Promise<ConfigValueType \| undefined>