Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Fetches data from an external API and returns it.
# fastly/demo/fetch.js
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
const response = await fetch('https://api.github.com')
const data = await response.json()
return new Response(JSON.stringify(data), {
status: 200,
headers: { 'Content-Type': 'application/json' }
})
}Fastly Compute@Edge is a high-performance, serverless edge computing platform that allows developers to deploy code closer to users, enabling low-latency web experiences and fast content delivery.
Origin & Creator
Compute@Edge was developed by Fastly, a company known for its edge cloud platform, and launched in 2019 to extend serverless capabilities to the edge.
Industrial Note
Compute@Edge is ideal for developers and enterprises needing ultra-low latency, edge-deployed serverless functions integrated with Fastly’s CDN for web acceleration and real-time traffic manipulation.