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
1616## Getting started
1717
18181 . 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.
2020 ``` 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
2222 ```
23233 . Create the ` upstash ` backend, changing the default hostname to the one provided in the Upstash console.
24244 . Create the ` protected_content ` backend by accepting the default example host or setting your own.
25255 . 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 .
2727
2828## Understanding the code
2929
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ name = "Queuing / Waiting room (JS)"
66
77[scripts ]
88 build = " npm run build"
9+ post_init = " npm install"
910
1011[local_server ]
1112
Original file line number Diff line number Diff line change 99 "jws" : " ^4.0.0"
1010 },
1111 "devDependencies" : {
12+ "@fastly/cli" : " ^10.14.0" ,
1213 "buffer" : " ^6.0.3" ,
1314 "node-polyfill-webpack-plugin" : " ^2.0.1" ,
1415 "webpack" : " ^5.89.0" ,
2829 "scripts" : {
2930 "prebuild" : " webpack" ,
3031 "build" : " js-compute-runtime bin/index.js bin/main.wasm" ,
32+ "start" : " fastly compute serve" ,
3133 "deploy" : " fastly compute publish"
3234 },
3335 "version" : " 1.0.0-pre"
You can’t perform that action at this time.
0 commit comments