@@ -34,7 +34,7 @@ const endpoint = process.env.AZURE_APPCONFIG_ENDPOINT;
34
34
const credential = new DefaultAzureCredential (); // For more information, see https://learn.microsoft.com/azure/developer/javascript/sdk/credential-chains#use-defaultazurecredential-for-flexibility
35
35
36
36
async function run () {
37
- // Connect to Azure App Configuration using a token credential and load all key-values with null label.
37
+ // Connect to Azure App Configuration using a token credential and load all key-values with no label.
38
38
const settings = await load (endpoint, credential);
39
39
console .log (' settings.get("message"):' , settings .get (" message" ));
40
40
}
@@ -49,7 +49,7 @@ const { load } = require("@azure/app-configuration-provider");
49
49
const connectionString = process .env .AZURE_APPCONFIG_CONNECTION_STRING ;
50
50
51
51
async function run () {
52
- // Connect to Azure App Configuration using a connection string and load all key-values with null label.
52
+ // Connect to Azure App Configuration using a connection string and load all key-values with no label.
53
53
const settings = await load (connectionString);
54
54
console .log (' settings.get("message"):' , settings .get (" message" ));
55
55
}
@@ -120,7 +120,7 @@ The `AzureAppConfiguration` type extends the following interfaces:
120
120
121
121
### Load specific key - values using selectors
122
122
123
- By default , the ` load ` method will load all configurations with null label from the configuration store . You can configure the behavior of the ` load ` method through the optional parameter of [` AzureAppConfigurationOptions ` ](https :// github.com/Azure/AppConfiguration-JavaScriptProvider/blob/main/src/AzureAppConfigurationOptions.ts) type.
123
+ By default , the ` load ` method will load all configurations with no label from the configuration store . You can configure the behavior of the ` load ` method through the optional parameter of [` AzureAppConfigurationOptions ` ](https :// github.com/Azure/AppConfiguration-JavaScriptProvider/blob/main/src/AzureAppConfigurationOptions.ts) type.
124
124
125
125
To refine or expand the configurations loaded from the App Configuration store , you can specify the key or label selectors under the ` AzureAppConfigurationOptions.selectors ` property .
126
126
@@ -239,7 +239,7 @@ You can [create feature flags](./manage-feature-flags.md#create-a-feature-flag)
239
239
const settings = await load(endpoint, credential, {
240
240
featureFlagOptions: {
241
241
enabled: true,
242
- selectors: [ { keyFilter: "*" } ],
242
+ selectors: [ { keyFilter: "*", labelFilter: "Prod" } ],
243
243
refresh: {
244
244
enabled: true,
245
245
refreshIntervalInMs: 10_000
@@ -249,7 +249,7 @@ const settings = await load(endpoint, credential, {
249
249
` ` `
250
250
251
251
> [! NOTE ]
252
- > Selectors for feature flags must be explicitly provided . Otherwise , an exception will be thrown .
252
+ > If ` featureFlagOptions ` is enabled and no selector is specified , the configuration provider will load all feature flags with no label from the App Configuration store .
253
253
254
254
### Feature management
255
255
0 commit comments