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
#Customer intent: As a Node.js developer, new to Azure Cache for Redis, I want to create a new Node.js app that uses Azure Cache for Redis.
@@ -29,7 +29,7 @@ For examples of using other Node.js clients, see the individual documentation fo
29
29
30
30
Add environment variables for your **HOST NAME** and **Primary** access key. Use these variables from your code instead of including the sensitive information directly in your code.
31
31
32
-
```powershell
32
+
```cmd
33
33
set AZURE_CACHE_FOR_REDIS_HOST_NAME=contosoCache
34
34
set AZURE_CACHE_FOR_REDIS_ACCESS_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
35
35
```
@@ -40,15 +40,14 @@ The latest builds of [node_redis](https://github.com/mranney/node_redis) provide
40
40
41
41
## Create a new Node.js app
42
42
43
-
1. Create a new script file named *redistest.js*.
43
+
1. Create a new script file named *redistest.js*.
44
44
1. Use the command to install a redis package.
45
45
46
46
```bash
47
47
`npm install redis`
48
48
```
49
49
50
-
1. Add the following example JavaScript to the file.
51
-
50
+
1. Add the following example JavaScript to the file.
52
51
53
52
```javascript
54
53
const redis = require("redis");
@@ -101,17 +100,16 @@ The latest builds of [node_redis](https://github.com/mranney/node_redis) provide
This code shows you how to connect to an Azure Cache forRedis instance using the cache host name and key environment variables. The code also stores and retrieves a string valuein 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/).
106
103
104
+
This code shows you how to connect to an Azure Cache forRedis instance using the cache host name and key environment variables. The code also stores and retrieves a string valuein 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/).
0 commit comments