Page Contents

Home > @loopback/context > Binding > configure

Binding.configure() method

Create a configuration binding for the given key

Signature:

static configure<T = unknown>(key: BindingAddress): Binding<T>;

Parameters

Parameter Type Description
key BindingAddress Key for the binding to be configured

Returns:

Binding<T>

Example

const configBinding = Binding.configure('servers.RestServer.server1')
  .to({port: 3000});