New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

statsig-node-vercel

Package Overview
Dependencies
Maintainers
0
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

statsig-node-vercel

[![npm version](https://badge.fury.io/js/statsig-node-vercel.svg)](https://badge.fury.io/js/statsig-node-vercel)

  • 0.7.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

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 });

FAQs

Package last updated on 25 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc