Tiny library (v0.0.5) that adds promise awareness to node_redis, the main Node.js Redis client. It is promise-library agnostic, allowing developers to use native JavaScript promises or any external promise library like Q, when, or Bluebird via a factory function. The library wraps node_redis commands to return promises instead of using callbacks, while preserving the original node_redis API and callback support for legacy code. It is very small and has no additional dependencies beyond node_redis.
npm install promise-redisNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a promisified Redis client using native promises and perform set/get operations.
Migrate to ioredis or update node_redis to v4 and use its native promise API.
Ensure the factory matches the expected signature: function(resolver) { return new MyPromise(resolver); }.For pub/sub, use the traditional callback-based approach or switch to ioredis which fully supports promises.
Always invoke the factory: const redis = require('promise-redis')();const redis = require('promise-redis')(); // invoke the factoryEnsure you called the factory: const redis = require('promise-redis')(); and use the returned redis object.Provide a promise factory: require('promise-redis')(require('bluebird'));