Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Returns a JSON response from a Fastly Edge function.
# fastly/demo/json.js
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
return new Response(JSON.stringify({ message: 'Hello, JSON!' }), {
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.