cloudflare · Cloudflare Workers Docs
Workers Static Assets
Teaches how to deploy and serve static assets alongside Cloudflare Workers, including configuration via Wrangler, routing logic, and using the assets binding to fetch files within Worker code.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers Static Assets
Teaches how to deploy and serve static assets alongside Cloudflare Workers, including configuration via Wrangler, routing logic, and using the assets binding to fetch files within Worker code.
When To Use
Use when you need to deploy a full-stack application that serves HTML, CSS, and images alongside custom Worker logic or when configuring single-page application routing behavior.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-static-assets-workflow-guide.md | A guide explaining how to upload, route, and cache static assets within Cloudflare Workers. | Questions about a guide explaining how to upload, route, and cache static assets within Cloudflare Workers. |
examples/workers-static-assets-cloudflare-workers-static-assets-react-app-creatio.text | The npm command used to initialize a new React application specifically configured for Cloudflare Workers Static Assets. | Exact payloads, commands, or snippets shown in The npm command used to initialize a new React application specifically configured for Cloudflare Workers Static Assets. |
examples/workers-static-assets-cloudflare-workers-static-assets-react-app-creatio-2.text | The shell command used to initialize a new React application using the Cloudflare create command for Workers Static Assets. | Exact payloads, commands, or snippets shown in The shell command used to initialize a new React application using the Cloudflare create command for Workers Static A... |
examples/workers-static-assets-cloudflare-workers-static-assets-react-project-cre.text | A shell command demonstrating how to initialize a new React application using the Cloudflare create command for use with Workers Static Assets. | Exact payloads, commands, or snippets shown in A shell command demonstrating how to initialize a new React application using the Cloudflare create command for use w... |
examples/workers-static-assets-cloudflare-workers-static-assets-wrangler-config.text | A wrangler.toml configuration example demonstrating the assets directory and binding settings for Cloudflare Workers Static Assets. | Exact payloads, commands, or snippets shown in A wrangler.toml configuration example demonstrating the assets directory and binding settings for Cloudflare Workers... |
examples/workers-static-assets-cloudflare-workers-static-assets-wrangler-config-2.text | A wrangler.toml configuration example defining the assets directory, binding, and compatibility date for Cloudflare Workers Static Assets. | Exact payloads, commands, or snippets shown in A wrangler.toml configuration example defining the assets directory, binding, and compatibility date for Cloudflare W... |
examples/workers-static-assets-cloudflare-workers-static-assets-index-js.text | A JavaScript index.js file demonstrating how to handle API routes and fetch static assets within a Cloudflare Worker. | Exact payloads, commands, or snippets shown in A JavaScript index.js file demonstrating how to handle API routes and fetch static assets within a Cloudflare Worker. |
examples/workers-static-assets-cloudflare-workers-static-assets-python-entrypoint.text | A Python implementation of a WorkerEntrypoint that serves static assets while handling specific API routes. | Exact payloads, commands, or snippets shown in A Python implementation of a WorkerEntrypoint that serves static assets while handling specific API routes. |
examples/workers-static-assets-cloudflare-workers-static-assets-wrangler-configur.text | A wrangler.toml configuration snippet defining the assets directory and single-page application error handling for Cloudflare Workers. | Exact payloads, commands, or snippets shown in A wrangler.toml configuration snippet defining the assets directory and single-page application error handling for Cl... |
examples/workers-static-assets-cloudflare-workers-static-assets-configuration.text | A configuration example demonstrating the assets directory and notfoundhandling settings for Cloudflare Workers Static Assets. | Exact payloads, commands, or snippets shown in A configuration example demonstrating the assets directory and notfoundhandling settings for Cloudflare Workers Stati... |
examples/workers-static-assets-cloudflare-workers-static-assets-wrangler-configur-2.text | A wrangler.toml configuration example demonstrating how to define static assets with single-page application routing and directory bindings. | Exact payloads, commands, or snippets shown in A wrangler.toml configuration example demonstrating how to define static assets with single-page application routing... |
examples/workers-static-assets-cloudflare-workers-static-assets-wrangler-toml-con.text | A wrangler.toml configuration file demonstrating how to define static assets, directory paths, and single-page application error handling for Cloudflare Workers. | Exact payloads, commands, or snippets shown in A wrangler.toml configuration file demonstrating how to define static assets, directory paths, and single-page applic... |
What This Skill Covers
- You can upload static assets (HTML, CSS, images and other files) as part of your Worker, and Cloudflare will handle caching and serving them to web browsers.
- Main sections:
How it works,Routing behavior,Caching behavior,Try it out,Learn more.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.cloudflare.com/workers/static-assets
