promisify redis commands with util.promisify
redis-promisify will add promisified method(client[command + 'Async'], such as client.setAsync) for client and multi
npm i redis-promisify --save
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)
})
client commands: redis-commands
multi commands: ['execAtomicAsync', 'execAsync']