Page Contents

Home > @loopback/context > Context > getConfig

Context.getConfig() method

Resolve configuration for the binding by key

Signature:

getConfig<ConfigValueType>(key: BindingAddress, propertyPath?: string, resolutionOptions?: ResolutionOptions): Promise<ConfigValueType | undefined>;

Parameters

</tbody></table> **Returns:** Promise<ConfigValueType \| undefined>
Parameter Type Description
key [BindingAddress](/doc/en/lb4/apidocs.context.bindingaddress.html) Binding key
propertyPath string _(Optional)_ Property path for the option. For example, `x.y` requests for `.x.y`. If not set, the `` object will be returned. </td></tr>
resolutionOptions [ResolutionOptions](/doc/en/lb4/apidocs.context.resolutionoptions.html) _(Optional)_ Options for the resolution.