Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.

Sample application demonstrating how to connect ConfigCat to PubNub

Using PubNub delivery provider your application gets notified on configuration changes instantly via server sent messages. This way polling Configcat for new values isn't necessary since in some cases (Mobile applications) polling is an anti-pattern (CPU load, Battery drain).

Running the sample app with own ConfigCat account:

  1. Add a feature flag

  2. Copy your newly created feature flag's key from to index.js

    const configcatSettingKey = "<YOUR-FEATURE-FLAG-KEY>";
  3. Copy your Configcat API Key from to index.js

    const configcatApiKey = "<YOUR-API-KEY>"; 
  4. Add a HTTP GET webhook ( with a PubNub URL. The PubNub URL can be either your own or the following working demo URL to make sure PubNub gets notified when your feature flag values change.

  5. Run the sample app:

    npm install && node index.js
  6. Change $ Save your feature flag value to see updates in the log.

You should see something like this in your log:

isAwesomeFeatureEnabled: false
isAwesomeFeatureEnabled: false
isAwesomeFeatureEnabled: false
Force update message received from PubNub. Updated cache.
isAwesomeFeatureEnabled: true
isAwesomeFeatureEnabled: true
isAwesomeFeatureEnabled: true
You can’t perform that action at this time.