launchdarkly / cloudflare-edge-sdk

LaunchDarkly Server-side SDK for Cloudflare Workers
Other
3 stars 3 forks source link
experimentation feature-flags feature-toggles launchdarkly launchdarkly-sdk managed-by-terraform mirror sdk

LaunchDarkly Edge SDK for Cloudflare

CircleCI

Important note

As mentioned in the repository changelog, the cloudflare-edge-sdk project has been renamed to cloudflare-server-sdk. All future releases will be made from the new repository. Please consider upgrading and filing potential requests in that repository's issue tracker.

v1.x readme

This library supports using Cloudflare Workers KV to replace the default in-memory feature store of the LaunchDarkly Node.js SDK.

For more information, see the SDK features guide.

Quick setup

  1. Install this package with npm:

    npm install launchdarkly-cloudflare-edge-sdk --save
  2. Require the package:

    const { init } = require('launchdarkly-cloudflare-edge-sdk');
  3. When configuring your SDK client, initialize with the Cloudflare KV namespace:

    const client = init(KV_NAMESPACE, 'YOUR CLIENT-SIDE SDK KEY');

About LaunchDarkly