0.0.1 • Published 8 years ago

p-redis v0.0.1

Weekly downloads
5
License
MIT
Repository
github
Last release
8 years ago

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 use require("redis") and still use the promisified functions.