Page Contents

Home > @loopback/context > Context > getConfig

Context.getConfig() method

Resolve configuration for the binding by key


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


Parameter Type Description
key BindingAddress Binding key
propertyPath string (Optional) Property path for the option. For example, x.y requests for <config>.x.y. If not set, the <config> object will be returned.
resolutionOptions ResolutionOptions (Optional) Options for the resolution.


Promise<ConfigValueType | undefined>