Skip to content

Commit 77d6e8e

Browse files
authored
Merge pull request #49447 from sinedied/patch-1
Add details to Node.js app instructions
2 parents 58ee92c + f307f73 commit 77d6e8e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

articles/azure-cache-for-redis/cache-nodejs-get-started.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,15 @@ Don't create a new connections for each operation in your code. Instead, reuse c
5151

5252
## Create a new Node.js app
5353

54-
Create a new script file named *redistest.js*.
54+
Create a new script file named *redistest.js*. Use the command `npm install redis bluebird` to install required packages.
5555

5656
Add the following example JavaScript to the file. This code shows you how to connect to an Azure Cache for Redis instance using the cache host name and key environment variables. The code also stores and retrieves a string value in the cache. The `PING` and `CLIENT LIST` commands are also executed. For more examples of using Redis with the [node_redis](https://github.com/mranney/node_redis) client, see [https://redis.js.org/](https://redis.js.org/).
5757

5858
```js
5959
var redis = require("redis");
6060
var bluebird = require("bluebird");
6161

62+
// Convert Redis client API to use promises, to make it usable with async/await syntax
6263
bluebird.promisifyAll(redis.RedisClient.prototype);
6364
bluebird.promisifyAll(redis.Multi.prototype);
6465

0 commit comments

Comments
 (0)