statsig-node-vercel
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

Statsig Node Server SDK - Edge Config Adapter

npm version

A first party Edge Config integration with the Statsig server-side Node.js SDK.

Quick Setup

  1. Install the Statsig Node SDK
npm install statsig-node@5.3.0
  1. Install this package and the Edge Config SDK
npm install statsig-node-vercel @vercel/edge-config
  1. Install the Statsig Vercel Integration
  2. Import the packages
import { EdgeConfigDataAdapter } from "statsig-node-vercel";
import { createClient } from "@vercel/edge-config";
  1. Create an instance of the EdgeConfigDataAdapter
const edgeConfigClient = createClient(process.env.EDGE_CONFIG);
const dataAdapter = new EdgeConfigDataAdapter("KEY_FROM_INSTALLATION");
  1. When initializing the statsig sdk, add the adapter to options
await statsig.initialize("server-secret-key", { dataAdapter: dataAdapter });

Readme

Keywords

none

Package Sidebar

Install

npm i statsig-node-vercel

Weekly Downloads

29,787

Version

0.2.0

License

ISC

Unpacked Size

12.6 kB

Total Files

14

Last publish

Collaborators

  • kenny-statsig
  • daniel-statsig
  • sroyal
  • statsig-admin