Prompt Buddy logoPrompt Buddy

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.

Import to Prompt Buddy

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

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-static-assets-workflow-guide.mdA 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.textThe 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.textThe 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.cloudflare.com/workers/static-assets