0.4.0 • Published 11 months ago

statsig-node-vercel v0.4.0

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

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({
  edgeConfigClient: edgeConfigClient,
  edgeConfigItemKey: "ITEM_KEY_FROM_INSTALLATION", // something like "statsig-5FSfBpWM9kUPqeKRlZPkod"
})
  1. When initializing the statsig sdk, add the adapter to options, along with the initStrategyForIDLists and disableIdListsSync options to avoid a blocking network call for ID Lists. However, if you are using Statsig ID lists for evaluation, you'll need to omit those options and incur a network request to grab ID lists.
await statsig.initialize("server-secret-key", { dataAdapter: dataAdapter, initStrategyForIDLists: 'none', disableIdListsSync: true });
0.3.0

11 months ago

0.4.0

11 months ago

0.2.0

2 years ago

0.1.0-beta.0

2 years ago

0.2.0-beta.1

2 years ago

0.2.0-beta.0

2 years ago

0.1.0

2 years ago

0.0.4-beta.0

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

3 years ago

0.0.3-beta.1

3 years ago

0.0.3-beta.0

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

0.0.1-beta.9

3 years ago

0.0.1-beta.8

3 years ago

0.0.1-beta.7

3 years ago

0.0.1-beta.6

3 years ago

0.0.1-beta.5

3 years ago

0.0.1-beta.4

3 years ago

0.0.1-beta.3

3 years ago

0.0.1-beta.2

3 years ago

0.0.1-beta.1

3 years ago

0.0.1-beta.0

3 years ago