Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
A Worker that reads query parameters and responds with them.
# cloudflare/demo/query.js
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
const url = new URL(request.url)
const name = url.searchParams.get('name') || 'Guest'
return new Response('Hello, ' + name, { status: 200 })
}Cloudflare Workers is a serverless platform for deploying JavaScript, TypeScript, and Rust functions at the edge, allowing developers to run code globally close to end-users with low latency.
Origin & Creator
Cloudflare Workers was launched by Cloudflare in 2017 as a way to run serverless code at the edge.
Industrial Note
Cloudflare Workers excels in global, low-latency applications where edge execution and near-instant scalability are critical.