Skip to content

Commit 7f590da

Browse files
committed
rename as config store
1 parent 4776417 commit 7f590da

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Park website visitors in a virtual queue to reduce the demand on your origins du
2222
```
2323
3. Create the `upstash` backend, changing the default hostname to the one provided in the Upstash console.
2424
4. Create the `protected_content` backend by accepting the default example host or setting your own.
25-
5. Populate the `config` dictionary by following the prompts to configure Upstash and set a secret for signing cookies.
25+
5. Populate the `config` config store by following the prompts to configure Upstash and set a secret for signing cookies.
2626
6. Run `fastly compute publish` to deploy your queue.
2727

2828
## Understanding the code

fastly.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ name = "Queuing / Waiting room (JS)"
1919
override_host = "eu1-close-treefrog-37046.upstash.io"
2020
url = "https://eu1-close-treefrog-37046.upstash.io"
2121

22-
[local_server.dictionaries]
22+
[local_server.config_stores]
2323

24-
[local_server.dictionaries.config]
24+
[local_server.config_stores.config]
2525
file = "devconfig.example.json"
2626
format = "json"
2727

@@ -33,19 +33,19 @@ name = "Queuing / Waiting room (JS)"
3333

3434
[setup.backends.upstash]
3535

36-
[setup.dictionaries]
36+
[setup.config_stores]
3737

38-
[setup.dictionaries.config]
38+
[setup.config_stores.config]
3939

40-
[setup.dictionaries.config.items]
40+
[setup.config_stores.config.items]
4141

42-
[setup.dictionaries.config.items.jwt_secret]
42+
[setup.config_stores.config.items.jwt_secret]
4343
description = "Secret for JWT signing"
4444

45-
[setup.dictionaries.config.items.upstash_token]
45+
[setup.config_stores.config.items.upstash_token]
4646
description = "Token for Upstash REST API"
4747

48-
[setup.dictionaries.config.items.upstash_url]
48+
[setup.config_stores.config.items.upstash_url]
4949
description = "URL of Upstash service (e.g. https://eu1-close-treefrog-35041.upstash.io)"
5050

5151
[setup.log_endpoints]

src/config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
import { ConfigStore } from "fastly:config-store";
2+
13
function fetchConfig() {
2-
let dict = new Dictionary("config");
4+
let dict = new ConfigStore("config");
35

46
return {
57
upstash: {

src/static/demo-manifest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ This demo is available as a [starter kit](https://developer.fastly.com/solutions
4040
```
4141
3. Create the `upstash` backend, changing the default hostname to the one provided in the Upstash console.
4242
4. Create the `protected_content` backend by accepting the default example host or setting your own.
43-
5. Populate the `config` dictionary by following the prompts.
43+
5. Populate the `config` config store by following the prompts.
4444
6. Run `fastly compute publish` to deploy your queue. -->

0 commit comments

Comments
 (0)