1.1.1 • Published 5 years ago

@skypager/features-redis v1.1.1

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

Redis Feature

Provides a wrapper around the node redis client that will self configure based on the runtime settings and process.env

Usage

const runtime = require('@skypager/node')
const redisFeature = require('@skypager/features-redis')

runtime.use(redisFeature, {
  url: process.env.REDIS_URL
})

runtime.redis.async.keys('*').then((keys) => console.log('Redis KEYS', keys))

Async Wrapper

The redis.async property returns promisified versions of all of the core redis commands

Pubsub

The redis feature can maintain two clients, one that is in subscribe mode, and another that is free to publish and run any other command.

runtime.redis.subscribe('channel', (message) => {
  console.log('got message')
})

runtime.redis.publish('channel', 'some message')
1.1.1

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.1-alpha.1

5 years ago

1.0.1-alpha.0

5 years ago

0.4.2

5 years ago

0.4.0

5 years ago

0.3.6

5 years ago

0.3.3

5 years ago