sweetwork-redis-client
v1.0.0
Published
A simple home brewed wrapper for Redis
Downloads
3
Readme
sweetwork-redis-client - a home brewed redis wrapper
Usage
const SweetworkRedisClient = require('sweetwork-redis-client');
const redis = new SweetworkRedisClient(/* optional db_index */); // default db_index = 9
redis.zcount(myRedisKey).then(count => {
// do stuff...
}, error => {
// oops!
});
// or
try {
const count = await redis.zcount(myRedisKey);
} catch (e) {
// oops!
}
Test
npm test
Todo
- Move const variables in a
config.js
file