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
Copy file name to clipboardExpand all lines: articles/azure-cache-for-redis/cache-nodejs-get-started.md
+12-11Lines changed: 12 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ In this quickstart, you incorporate Azure Cache for Redis into a Node.js app to
19
19
- Azure subscription - [create one for free](https://azure.microsoft.com/free/)
20
20
- 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.
### Install the JavaScript Azure Identity client library
41
40
@@ -117,7 +116,7 @@ npm install @azure/identity
117
116
node redistest.js
118
117
```
119
118
120
-
1. Example the output.
119
+
1. The output of your code looks like this.
121
120
122
121
```bash
123
122
Cache command: PING
@@ -138,15 +137,15 @@ npm install @azure/identity
138
137
Done
139
138
```
140
139
141
-
## Create a sample JavaScript app with reauthentication
140
+
### Create a sample JavaScript app with reauthentication
142
141
143
142
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.
144
143
145
144
1. Create a new script file named _redistestreauth.js_.
146
145
147
146
1. Add the following example JavaScript to the file.
Add environment variables foryour **HOST NAME** and **Primary** access key. Use these variables from your code instead of including the sensitive information directlyin your code.
0 commit comments