-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8985a27
commit 31ba38c
Showing
3 changed files
with
22 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
var configcat = require("configcat-node"); | ||
|
||
var configCatClient = configcat.createClientWithAutoPoll('PKDVCLf-Hq-h-kCzMp-L7Q/HhOWfwVtZ0mb30i9wi17GQ', { pollIntervalSeconds: 2 }); | ||
const logger = configcat.createConsoleLogger(3); // Setting log level to 3 (= Info) to show detailed feature flag evaluation | ||
|
||
const configCatClient = configcat.createClientWithAutoPoll('PKDVCLf-Hq-h-kCzMp-L7Q/HhOWfwVtZ0mb30i9wi17GQ', { pollIntervalSeconds: 2, logger: logger }); | ||
// You can instantiate the client with different polling modes. See the Docs: https://docs.configcat.com/docs/sdk-reference/js/#polling-modes | ||
|
||
configCatClient.getValueAsync("isAwesomeFeatureEnabled", false).then(value => { | ||
console.log("isAwesomeFeatureEnabled: " + value); | ||
}); | ||
|
||
var userObject = { identifier: "#SOME-USER-ID#", email: "[email protected]" }; | ||
const userObject = { identifier: "#SOME-USER-ID#", email: "[email protected]" }; | ||
// Read more about the User Object: https://docs.configcat.com/docs/sdk-reference/js/#user-object | ||
configCatClient.getValueAsync("isPOCFeatureEnabled", false, userObject).then(value => { | ||
console.log("isPOCFeatureEnabled: " + value); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters