Skip to content

Commit 3b864c1

Browse files
authored
Merge pull request #13 from fastly/kats/cli-deps
Use @fastly/cli in the starter kit
2 parents cadcfca + 17779a1 commit 3b864c1

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

1818
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.
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
```
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.
2525
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.
2727

2828
## Understanding the code
2929

fastly.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
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",
@@ -28,6 +29,7 @@
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"

0 commit comments

Comments
 (0)