File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -16,14 +16,14 @@ Park website visitors in a virtual queue to reduce the demand on your origins du
16
16
## Getting started
17
17
18
18
1 . If you haven't already, [ sign up for Upstash] ( https://www.npmjs.com/package/@upstash/redis ) and create a Redis service.
19
- 2 . Initialize a Compute project using this starter kit.
19
+ 2 . Create a new directory for your application and switch to it. Initialize a Compute project using this starter kit.
20
20
``` sh
21
- fastly compute init --from=https://github.com/fastly/compute- starter-kit-javascript- queue
21
+ npm create @fastly/ compute@latest -- --language=javascript -- starter-kit= queue
22
22
```
23
23
3 . Create the ` upstash ` backend, changing the default hostname to the one provided in the Upstash console.
24
24
4 . Create the ` protected_content ` backend by accepting the default example host or setting your own.
25
25
5 . Populate the ` config ` config store by following the prompts to configure Upstash and set a secret for signing cookies.
26
- 6 . Run ` fastly compute publish ` to deploy your queue.
26
+ 6 . Run ` npm run deploy ` to deploy your queue to your Fastly account .
27
27
28
28
## Understanding the code
29
29
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ name = "Queuing / Waiting room (JS)"
6
6
7
7
[scripts ]
8
8
build = " npm run build"
9
+ post_init = " npm install"
9
10
10
11
[local_server ]
11
12
Original file line number Diff line number Diff line change 9
9
"jws" : " ^4.0.0"
10
10
},
11
11
"devDependencies" : {
12
+ "@fastly/cli" : " ^10.14.0" ,
12
13
"buffer" : " ^6.0.3" ,
13
14
"node-polyfill-webpack-plugin" : " ^2.0.1" ,
14
15
"webpack" : " ^5.89.0" ,
28
29
"scripts" : {
29
30
"prebuild" : " webpack" ,
30
31
"build" : " js-compute-runtime bin/index.js bin/main.wasm" ,
32
+ "start" : " fastly compute serve" ,
31
33
"deploy" : " fastly compute publish"
32
34
},
33
35
"version" : " 1.0.0-pre"
You can’t perform that action at this time.
0 commit comments