Skip to content

Commit 93fffe2

Browse files
authored
Merge pull request #14 from fastly/dora-compute-rename
DEVLIB-1233: Rename Compute@Edge to Compute
2 parents 5ebeb54 + 74e0416 commit 93fffe2

6 files changed

+28
-31
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
[![Deploy to Fastly](https://deploy.edgecompute.app/button)](https://deploy.edgecompute.app/deploy)
44

5-
Get to know the Fastly Compute@Edge environment with a basic starter that demonstrates routing, simple synthetic responses and code comments that cover common patterns.
5+
Get to know the Fastly Compute environment with a basic starter that demonstrates routing, simple synthetic responses and code comments that cover common patterns.
66

7-
**For more details about other starter kits for Compute@Edge, see the [Fastly developer hub](https://developer.fastly.com/solutions/starters)**
7+
**For more details about other starter kits for Compute, see the [Fastly developer hub](https://developer.fastly.com/solutions/starters)**
88

99
## Features
1010
* Allow only requests with particular HTTP methods
@@ -13,11 +13,11 @@ Get to know the Fastly Compute@Edge environment with a basic starter that demons
1313

1414
## Understanding the code
1515

16-
This starter is intentionally lightweight, and requires no dependencies aside from the [`@fastly/js-compute`](https://www.npmjs.com/package/@fastly/js-compute) npm package. It will help you understand the basics of processing requests at the edge using Fastly. This starter includes implementations of common patterns explained in our [using Compute@Edge](https://developer.fastly.com/learning/compute/javascript/) and [VCL migration](https://developer.fastly.com/learning/compute/migrate/) guides.
16+
This starter is intentionally lightweight, and requires no dependencies aside from the [`@fastly/js-compute`](https://www.npmjs.com/package/@fastly/js-compute) npm package. It will help you understand the basics of processing requests at the edge using Fastly. This starter includes implementations of common patterns explained in our [using Compute](https://developer.fastly.com/learning/compute/javascript/) and [VCL migration](https://developer.fastly.com/learning/compute/migrate/) guides.
1717

18-
The starter doesn't require the use of any backends. Once deployed, you will have a Fastly service running on Compute@Edge that can generate synthetic responses at the edge.
18+
The starter doesn't require the use of any backends. Once deployed, you will have a Fastly service running on Compute that can generate synthetic responses at the edge.
1919

20-
The template uses TypeScript to compile source files in `./src` into JS files in `./build`, which are then wrapped into `./bin/index.wasm` using the `js-compute-runtime` CLI tool bundled with the `@fastly/js-compute` npm package, and bundled into a `.tar.gz` file ready for deployment to Compute@Edge.
20+
The template uses TypeScript to compile source files in `./src` into JS files in `./build`, which are then wrapped into `./bin/index.wasm` using the `js-compute-runtime` CLI tool bundled with the `@fastly/js-compute` npm package, and bundled into a `.tar.gz` file ready for deployment to Compute.
2121

2222
## Security issues
2323

fastly.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file describes a Fastly Compute@Edge package. To learn more visit:
1+
# This file describes a Fastly Compute package. To learn more visit:
22
# https://developer.fastly.com/reference/fastly-toml/
33

44
authors = ["<[email protected]>"]

package-lock.json

+15-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
"node": "^16 || >=18"
55
},
66
"devDependencies": {
7-
"typescript": "^5.0.2"
7+
"typescript": "^5.2.2"
88
},
99
"dependencies": {
10-
"@fastly/js-compute": "^3.4.0"
10+
"@fastly/js-compute": "^3.7.0"
1111
},
1212
"scripts": {
1313
"prebuild": "tsc",

src/index.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Default Compute@Edge template program.
1+
//! Default Compute template program.
22

33
/// <reference types="@fastly/js-compute" />
44
// import { CacheOverride } from "fastly:cache-override";
@@ -8,7 +8,7 @@ import { includeBytes } from "fastly:experimental";
88

99
// Load a static file as a Uint8Array at compile time.
1010
// File path is relative to root of project, not to this file
11-
const welcomePage = includeBytes("./src/welcome-to-compute@edge.html");
11+
const welcomePage = includeBytes("./src/welcome-to-compute.html");
1212

1313
// The entry point for your application.
1414
//
@@ -37,14 +37,14 @@ async function handleRequest(event: FetchEvent) {
3737

3838
// If request is to the `/` path...
3939
if (url.pathname == "/") {
40-
// Below are some common patterns for Compute@Edge services using JavaScript.
40+
// Below are some common patterns for Fastly Compute services using JavaScript.
4141
// Head to https://developer.fastly.com/learning/compute/javascript/ to discover more.
4242

4343
// Create a new request.
4444
// let bereq = new Request("http://example.com");
4545

4646
// Add request headers.
47-
// req.headers.set("X-Custom-Header", "Welcome to Compute@Edge!");
47+
// req.headers.set("X-Custom-Header", "Welcome to Fastly Compute!");
4848
// req.headers.set(
4949
// "X-Another-Custom-Header",
5050
// "Recommended reading: https://developer.fastly.com/learning/compute"

src/[email protected] src/welcome-to-compute.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
name="viewport"
88
content="width=device-width, initial-scale=1, shrink-to-fit=no"
99
/>
10-
<title>Welcome to Compute@Edge</title>
10+
<title>Welcome to Fastly Compute</title>
1111
<link
1212
rel="icon"
1313
href="https://developer.fastly.com/favicon-32x32.png"

0 commit comments

Comments
 (0)