Skip to content
Cloudflare Docs logomark
Cloudflare
Docs
Workers
Navigation menu icon
Open external link
Cloudflare Docs logomark
Cloudflare
Docs
Workers
Dropdown icon
Workers menu
Workers home
Playground
Pricing
Discord
Overview
Expand: Get started
Get started
Guide
Quickstarts
Examples
Tutorials
Expand: Learning
Learning
How Workers works
Security model
Debugging Workers
Logging from Workers
Metrics and analytics
How the Cache works
Expand: Integrations
Integrations
APIs
Databases
External Services
How KV works
How routing works
Migrating to module Workers
Using Service Worker syntax
Using Durable Objects
Using Streams
Using WebSockets
Continuous Integration
Playground
Expand: Platform
Platform
Storage options guide
Pricing
Betas
Expand: Bindings
Bindings
About Service bindings
Changelog
Compatibility dates
Deploy button
Deployments
Environment variables
Environments
Headers
Known issues
Languages
Limits
Logpush
Node.js compatibility
Page Rules
Protocols
Smart Placement (beta)
Tail Workers
Expand: Triggers
Triggers
Cron Triggers
Custom Domains
Routes
Expand: WebAssembly (Wasm)
WebAssembly (Wasm)
Wasm in JavaScript
Rust
Expand: Workers Sites
Workers Sites
Start from existing
Start from scratch
Start from worker
Workers Sites configuration
Expand: Runtime APIs
Runtime APIs
addEventListener
Cache
Durable Objects
EmailEvent
Encoding
Fetch
FetchEvent
HTMLRewriter
KV
mTLS
Expand: Node.js Compatibility
Node.js Compatibility
assert
AsyncLocalStorage
Buffer
EventEmitter
path
Streams
StringDecoder
util
R2
Request
Response
ScheduledEvent
Service bindings
Expand: Streams
Streams
ReadableStream
ReadableStream BYOBReader
ReadableStream DefaultReader
TransformStream
WritableStream
WritableStream DefaultWriter
TailEvent
TCP sockets
Web Crypto
Web standards
WebSockets
Expand: Databases
Databases
Connect to databases
Connect to PostgreSQL
Cloudflare D1
External link icon
Open external link
Expand: Wrangler
Wrangler
Install/Update Wrangler
Commands
Deprecations
Configuration
Custom builds
Workers KV
Bundling
System Environment Variables
Running in CI/CD
API
Expand: Migrations
Migrations
Expand: Migrate from Wrangler v1 to v2
Migrate from Wrangler v1 to v2
1. Migrate webpack projects
2. Update to Wrangler v2
Expand: Wrangler v1 (legacy)
Wrangler v1 (legacy)
Install / Update
Authentication
Commands
Configuration
Webpack
AI Assistant
Give Feedback
GitHub icon
Visit Workers on GitHub
Search icon (depiction of a magnifying glass)
Light theme icon (depiction of a sun)
Dark theme icon (depiction of a moon)
Set theme to dark (⇧+D)
↑ Top
Products
Workers
Tutorials
Build a Serverless API with Cloudflare Workers
Build a Serverless API with Cloudflare Workers