You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-09 00:22:08 +03:00
Merge pull request #1332 from gonenduk/master
Simpler bluebird promisifyAll usage
This commit is contained in:
@@ -86,8 +86,7 @@ You can also use node_redis with promises by promisifying node_redis with
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
const redis = require('redis');
|
const redis = require('redis');
|
||||||
bluebird.promisifyAll(redis.RedisClient.prototype);
|
bluebird.promisifyAll(redis);
|
||||||
bluebird.promisifyAll(redis.Multi.prototype);
|
|
||||||
```
|
```
|
||||||
|
|
||||||
It'll add a *Async* to all node_redis functions (e.g. return client.getAsync().then())
|
It'll add a *Async* to all node_redis functions (e.g. return client.getAsync().then())
|
||||||
|
Reference in New Issue
Block a user