name
The read-only name
property of the backend returns the backend name string.
Value
A string
.
Description
Provides the name of the backend.
Examples
Using name
The following example logs the string value of a Backend object:
import { Backend } from "fastly:backend";
async function app() {
const backend = new Backend({
name: "fastly",
target: "fastly.com",
});
console.log(backend.name); // "fastly"
}
addEventListener("fetch", event => event.respondWith(app(event)));