Cloudflare Workers documentation
Cloudflare Workers provides a serverless execution environment that allows you to create entirely new applications or augment existing ones without configuring or maintaining infrastructure.
Installing the Workers CLI
To install
wrangler
, ensure you have
npm
installed, preferably using a Node version manager like
Volta or
nvm to avoid permission issues or to easily change Node.js versions, then run:
$ npm install -g @cloudflare/wrangler
or install with yarn:
$ yarn global add @cloudflare/wrangler
Read more about
installing wrangler
.
Playground
View this Hello World example in the Workers playground:
addEventListener("fetch", event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
return new Response("Hello world")
}
Popular pages
- Learning: How Workers works – learn how Cloudflare’s global network powers Workers
- Pricing – learn about the Free and Bundled plans
- Reference: HTMLRewriter – parse and transform HTML from inside a Worker
- Limits – learn about plan limits (Free plans get 100,000 req/day)
Community
Explore third-party packages that work on Workers, submitted by Cloudflare users.
Connect with the Workers community on Discord to ask questions, show off what you are building, and discuss the platform with other developers.
Follow @CloudflareDev on Twitter to learn about product announcements, new tutorials, and what is new in Cloudflare Workers.