statsig-node-cloudflare-kv
v1.0.0
Published
[![npm version](https://badge.fury.io/js/statsig-node-cloudflare-kv.svg)](https://badge.fury.io/js/statsig-node-cloudflare-kv)
Downloads
2,497
Keywords
Readme
Statsig Node Server SDK - Edge Config Adapter
A first party Cloudflare integration with the Statsig server-side Node.js SDK.
Quick Setup
- Install the Statsig Node SDK
npm install [email protected]
- Install this package
npm install statsig-node-cloudflare-kv
- Setup the Statsig Cloudflare Integration
- Import the package
import { CloudflareKVDataAdapter } from 'statsig-node-cloudflare-kv'
- Create an instance of the
CloudflareKVDataAdapter
const dataAdapter = new CloudflareKVDataAdapter(env.YOUR_KV_BINDING, 'statsig-YOUR_COMPANY_ID');
- When initializing the
statsig
sdk, add the adapter to options
await statsig.initialize(
'server-secret-key',
{ dataAdapter: dataAdapter },
);