Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Responds differently based on request method.
# fastly/demo/method.js
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
if(request.method === 'POST') {
return new Response('POST received', { status: 200 })
} else {
return new Response('GET received', { status: 200 })
}
}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.