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: examples/DictionaryExample/README.md
+7-11Lines changed: 7 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,22 +2,18 @@
2
2
3
3
This example program demonstrates usage of the dictionary data type.
4
4
5
-
# Usage
6
-
7
-
The program assumes the auth token and cache names are available in environment variables. The auth token is assumed to be in the variable `MOMENTO_API_KEY` and the cache name in `MOMENTO_CACHE_NAME`. If either of these is missing, you will be prompted to enter the values on the terminal.
5
+
## Prerequisites
8
6
9
-
To run the program, run either:
7
+
*[`dotnet`](https://dotnet.microsoft.com/en-us/download) 6.0 or higher is required
8
+
* A Momento API key is required. You can generate one using the [Momento Console](https://console.gomomento.com/api-keys).
9
+
* A Momento service endpoint is required. Choose the one for the [region](https://docs.momentohq.com/platform/regions) you'll be using, e.g. `cache.cell-1-ap-southeast-1-1.prod.a.momentohq.com` for ap-southeast-1.
10
10
11
-
```bash
12
-
MOMENTO_API_KEY=<YOUR_API_KEY_HERE> MOMENTO_CACHE_NAME=<YOUR_CACHE_NAME_HERE> dotnet run
13
-
```
11
+
# Usage
14
12
15
-
or
13
+
To run the program, run either:
16
14
17
15
```bash
18
-
dotnet run
16
+
MOMENTO_API_KEY=<YOUR_API_KEY_HERE> MOMENTO_ENDPOINT=<YOUR_ENDPOINT> MOMENTO_CACHE_NAME=<YOUR_CACHE_NAME_HERE>dotnet run
19
17
```
20
18
21
-
and you will be prompted to enter the auth token and cache name.
22
-
23
19
If the cache name entered does not exist, the program will create it.
0 commit comments