2.0.1 • Published 2 years 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
statsigsdk, 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
2 years ago
2.0.0-beta.1
2 years ago
2.0.0-beta.0
2 years ago
2.0.0-beta.6
2 years ago
2.0.0-beta.5
2 years ago
2.0.1
2 years ago
2.0.0-beta.3
2 years ago
2.0.0
2 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0-beta.1
3 years ago
1.0.0
3 years ago
1.0.0-beta.0
3 years ago