statsig-node-vercel
v0.2.0
Published
[![npm version](https://badge.fury.io/js/statsig-node-vercel.svg)](https://badge.fury.io/js/statsig-node-vercel)
Downloads
156,959
Keywords
Readme
Statsig Node Server SDK - Edge Config Adapter
A first party Edge Config integration with the Statsig server-side Node.js SDK.
Quick Setup
- Install the Statsig Node SDK
npm install [email protected]
- Install this package and the Edge Config SDK
npm install statsig-node-vercel @vercel/edge-config
- Install the Statsig Vercel Integration
- Import the packages
import { EdgeConfigDataAdapter } from "statsig-node-vercel";
import { createClient } from "@vercel/edge-config";
- Create an instance of the
EdgeConfigDataAdapter
const edgeConfigClient = createClient(process.env.EDGE_CONFIG);
const dataAdapter = new EdgeConfigDataAdapter("KEY_FROM_INSTALLATION");
- When initializing the
statsig
sdk, add the adapter to options
await statsig.initialize("server-secret-key", { dataAdapter: dataAdapter });