ConfigCat SDK for node.js
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Log request errors Nov 13, 2018
.npmignore merge Nov 11, 2018
.travis.yml Feature/covsupport (#1) Nov 7, 2018
LICENSE Initial commit Apr 17, 2018

ConfigCat SDK for Node.js

ConfigCat SDK for Node.js provides easy integration between ConfigCat service and applications using Node.js.

ConfigCat is a feature flag, feature toggle, and configuration management service. That lets you launch new features and change your software configuration remotely without actually (re)deploying code. ConfigCat even helps you do controlled roll-outs like canary releases and blue-green deployments.

Build Status codecov Known Vulnerabilities License

Getting Started

1. Install and import package:

via NPM package:

npm i configcat-node
const configcat = require("configcat-node");

2. Log in to ConfigCat Management Console and go to your Project to get your API Key:


3. Create a ConfigCat client instance:

let configCatClient = configcat.createClient("#YOUR-API-KEY#");

We strongly recommend using the ConfigCat Client as a Singleton object in your application.

4. Get your setting value:

configCatClient.getValue("isMyAwesomeFeatureEnabled", false, (value) => {
    if(value) {
    } else {

Getting user specific setting values with Targeting

Using this feature, you will be able to get different setting values for different users in your application by passing a User Object to the getValue() function.

Read more about Targeting here.

configCatClient.getValue("isMyAwesomeFeatureEnabled", false, (value) => {
    if(value) {
    } else {
    {identifier : "#USER-IDENTIFIER#"}

Sample/Demo app

Sample Console App

Polling Modes

The ConfigCat SDK supports 3 different polling mechanisms to acquire the setting values from ConfigCat. After latest setting values are downloaded, they are stored in the internal cache then all requests are served from there. Read more about Polling Modes and how to use them at ConfigCat Docs.


If you need help how to use this SDK feel free to to contact the ConfigCat Staff on We're happy to help.


Contributions are welcome.

About ConfigCat