Skip to content

Commit e6413e2

Browse files
Merge pull request #277230 from flang-msft/fxl---command-type-is-wrong-#122843
fxl---updated code type--ado-28297350
2 parents b88489e + 0388c41 commit e6413e2

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: flang-msft
55
ms.service: cache
66
ms.devlang: javascript
77
ms.topic: quickstart
8-
ms.date: 02/16/2023
8+
ms.date: 06/04/2024
99
ms.author: franlanglois
1010
ms.custom: mvc, devx-track-js, mode-api, engagement-fy23
1111
#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
2929

3030
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.
3131

32-
```powershell
32+
```cmd
3333
set AZURE_CACHE_FOR_REDIS_HOST_NAME=contosoCache
3434
set AZURE_CACHE_FOR_REDIS_ACCESS_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
3535
```
@@ -40,15 +40,14 @@ The latest builds of [node_redis](https://github.com/mranney/node_redis) provide
4040

4141
## Create a new Node.js app
4242

43-
1. Create a new script file named *redistest.js*.
43+
1. Create a new script file named *redistest.js*.
4444
1. Use the command to install a redis package.
4545

4646
```bash
4747
`npm install redis`
4848
```
4949

50-
1. Add the following example JavaScript to the file.
51-
50+
1. Add the following example JavaScript to the file.
5251

5352
```javascript
5453
const redis = require("redis");
@@ -101,17 +100,16 @@ The latest builds of [node_redis](https://github.com/mranney/node_redis) provide
101100
102101
testCache().then((result) => console.log(result)).catch(ex => console.log(ex));
103102
```
104-
105-
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/).
106103
104+
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/).
107105
108106
1. Run the script with Node.js.
109107
110108
```bash
111109
node redistest.js
112110
```
113111
114-
1. Example the output.
112+
1. Example the output.
115113
116114
```console
117115
Cache command: PING

0 commit comments

Comments
 (0)