Skip to content

Commit 3fce7c1

Browse files
committed
fixing tabs
1 parent 1fe8082 commit 3fce7c1

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

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

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ In this quickstart, you incorporate Azure Cache for Redis into a Node.js app to
1919
- Azure subscription - [create one for free](https://azure.microsoft.com/free/)
2020
- Node.js installed, if you haven't done so already. See [Install Node.js on Windows](/windows/dev-environment/javascript/nodejs-on-windows) for instructions on how to install Node and Node Package Manager (NPM) on a Windows computer.
2121

22-
## Create a cache
22+
## Create a cache instance
2323

2424
[!INCLUDE [redis-cache-create](~/reusable-content/ce-skilling/azure/includes/azure-cache-for-redis/includes/redis-cache-create.md)]
2525

@@ -33,9 +33,8 @@ npm install redis
3333

3434
## [Microsoft Entra ID Authentication (recommended)](#tab/entraid)
3535

36-
### Enable Microsoft Entra ID and add a User or Service Principal
37-
38-
[!INCLUDE cache-entra-access]
36+
<!-- [!INCLUDE includes/cache-entra-access.md] -->
37+
[!INCLUDE [cache-entra-access](includes/cache-entra-access.md)]
3938

4039
### Install the JavaScript Azure Identity client library
4140

@@ -117,7 +116,7 @@ npm install @azure/identity
117116
node redistest.js
118117
```
119118
120-
1. Example the output.
119+
1. The output of your code looks like this.
121120
122121
```bash
123122
Cache command: PING
@@ -138,15 +137,15 @@ npm install @azure/identity
138137
Done
139138
```
140139
141-
## Create a sample JavaScript app with reauthentication
140+
### Create a sample JavaScript app with reauthentication
142141
143142
Microsoft Entra ID access tokens have a limited lifespan, [averaging 75 minutes](/entra/identity-platform/configurable-token-lifetimes#token-lifetime-policies-for-access-saml-and-id-tokens). In order to maintain a connection to your cache, you need to refresh the token. This example demonstrates how to do this using JavaScript.
144143
145144
1. Create a new script file named _redistestreauth.js_.
146145
147146
1. Add the following example JavaScript to the file.
148147
149-
```javascript
148+
```javascript
150149
const { createClient } = require("redis");
151150
const { DefaultAzureCredential } = require("@azure/identity");
152151
@@ -217,17 +216,17 @@ Microsoft Entra ID access tokens have a limited lifespan, [averaging 75 minutes]
217216
}
218217
219218
main().then((result) => console.log(result)).catch(ex => console.log(ex));
220-
```
219+
```
221220

222221
1. Run the script with Node.js.
223222

224223
```bash
225224
node redistestreauth.js
226225
```
227226

228-
1. Example the output.
227+
1. The output of your code looks like this.
229228

230-
```bash
229+
```bash
231230
Cache command: PING
232231
Cache response : PONG
233232
@@ -242,6 +241,7 @@ Microsoft Entra ID access tokens have a limited lifespan, [averaging 75 minutes]
242241
243242
Cache command: CLIENT LIST
244243
Cache response : id=10017364 addr=76.22.73.183:59380 fd=221 name= age=1 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=26 qbuf-free=32742 argv-mem=10 obl=0 oll=0 omem=0 tot-mem=61466 ow=0 owmem=0 events=r cmd=client user=default numops=6
244+
245245
```
246246

247247
>[!NOTE]
@@ -250,7 +250,8 @@ Microsoft Entra ID access tokens have a limited lifespan, [averaging 75 minutes]
250250

251251
## [Access Key Authentication](#tab/accesskey)
252252

253-
[!INCLUDE [redis-cache-access-keys](includes/redis-cache-access-keys.md)]
253+
[!INCLUDE includes/redis-cache-access-keys.md]
254+
254255

255256
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.
256257

0 commit comments

Comments
 (0)