2.0.1 • Published 6 months ago
statsig-node-redis v2.0.1
Statsig Node Server SDK - Redis Integration
A first party Redis integration with the Statsig server-side Node.js SDK.
Quick Setup
- 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
- Install this package
npm install statsig-node-redis
- Import the package
import { RedisDataAdapter } from 'statsig-node-redis'
- Create an instance of the
RedisDataAdapter
const dataAdapter = new RedisDataAdapter();
- 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,
);
param | default | description |
---|---|---|
hostname | 'localhost' | Redis server hostname |
port | 6379 | Redis server port |
password | ACL password or the old "--requirepass" password | |
db | 0 | Redis database number (supports 16 databases) |
Links
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