p-redis
v0.0.1
Published
Wrap node_redis with bluebird's promisifyAll().
Downloads
3
Readme
p-redis
Wrap node_redis with bluebird's promisifyAll().
Usage
- Install p-redis along with redis and bluebird.
$ npm install --save p-redis redis bluebird
- Call from within Node!
const redis = require("p-redis");
db.setAsync("name", "Monty").then(() => {
console.log("Done!");
});
How does it work?
- p-redis just a promisified version of the redis object.
require("p-redis") == require("redis"); // true
- So, you could call
require("p-redis")
once, and then userequire("redis")
and still use the promisified functions.