You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<a href="https://twitter.com/rnfirebase"><img src="https://img.shields.io/twitter/follow/NodeRedis.svg?style=flat-square&colorA=1da1f2&colorB=&label=Follow%20on%20Twitter" alt="Follow on Twitter"></a>
17
+
<a href="https://twitter.com/NodeRedis"><img src="https://img.shields.io/twitter/follow/NodeRedis.svg?style=flat-square&colorA=1da1f2&colorB=&label=Follow%20on%20Twitter" alt="Follow on Twitter"></a>
16
18
</p>
17
19
18
20
---
19
21
20
-
This is a complete and feature rich Redis client for node.js. __It supports all
22
+
This is a complete and feature rich Redis client for Node.js. __It supports all
21
23
Redis commands__ and focuses on high performance.
22
24
23
25
Install with:
24
26
25
-
npm install redis
27
+
```bash
28
+
npm install redis
29
+
```
26
30
27
31
## Usage Example
28
32
29
33
```js
30
-
var redis =require("redis"),
31
-
client =redis.createClient();
34
+
constredis=require("redis");
35
+
constclient=redis.createClient();
32
36
33
37
// if you'd like to select database 3, instead of 0 (default), call
34
38
// client.select(3, function() { /* ... */ });
@@ -69,6 +73,7 @@ landscape.
69
73
### Promises
70
74
71
75
#### Native Promises
76
+
72
77
If you are using node v8 or higher, you can promisify node_redis with [util.promisify](https://nodejs.org/api/util.html#util_util_promisify_original) as in:
73
78
```js
74
79
const {promisify} =require('util');
@@ -92,6 +97,7 @@ async function myFunc() {
92
97
```
93
98
94
99
#### Bluebird Promises
100
+
95
101
You can also use node_redis with promises by promisifying node_redis with
96
102
[bluebird](https://github.com/petkaantonov/bluebird) as in:
0 commit comments