redis-promisify

0.1.2 • Public • Published

redis-promisify

promisify redis commands with util.promisify

redis-promisify will add promisified method(client[command + 'Async'], such as client.setAsync) for client and multi

install

npm i redis-promisify --save

Usage

const redis = require('redis-promisify')
const client = redis.createClient({
  host: '127.0.0.1',
  port: 6379,
  db: 0
})

client.setAsync("string key", "string val").then((reply) => {
  console.log(reply)
})
client.multi().get('string key').execAsync().then((replies) => {
  console.log(replies)
})

commands

client commands: redis-commands

multi commands: ['execAtomicAsync', 'execAsync']

Readme

Keywords

Package Sidebar

Install

npm i redis-promisify

Weekly Downloads

1,944

Version

0.1.2

License

ISC

Unpacked Size

2.61 kB

Total Files

4

Last publish

Collaborators

  • zenxds