2.0.1 • Published 6 months ago

statsig-node-redis v2.0.1

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

Statsig Node Server SDK - Redis Integration

npm version

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

Quick Setup

  1. Install the Statsig Node SDK NOTE: (For now, you will need the latest beta version 4.18.0-beta.7)
npm install statsig-node@4.18.0-beta.7
  1. Install this package
npm install statsig-node-redis
  1. Import the package
import { RedisDataAdapter } from 'statsig-node-redis'
  1. Create an instance of the RedisDataAdapter
const dataAdapter = new RedisDataAdapter();
  1. When initializing the statsig sdk, add the adapter to options
await statsig.initialize(
    'server-secret-key',
    { dataAdapter: dataAdapter },
);

Customizing the adapter

When initializing RedisDataAdapter, you can specify the following options:

const dataAdapter = new RedisDataAdapter(
  hostname,
  port,
  password,
  db,
);
paramdefaultdescription
hostname'localhost'Redis server hostname
port6379Redis server port
passwordACL password or the old "--requirepass" password
db0Redis database number (supports 16 databases)

Links

Node Redis

2.0.0-beta.2

6 months ago

2.0.0-beta.1

6 months ago

2.0.0-beta.0

6 months ago

2.0.0-beta.6

6 months ago

2.0.0-beta.5

6 months ago

2.0.1

6 months ago

2.0.0-beta.3

6 months ago

2.0.0

6 months ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0-beta.1

2 years ago

1.0.0

2 years ago

1.0.0-beta.0

2 years ago