Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Workers Serving a subdirectory

Configures a Cloudflare Worker with static assets to serve content from a specific subpath by mirroring the directory structure within the asset directory and using Wrangler configuration.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Workers Serving a subdirectory

Configures a Cloudflare Worker with static assets to serve content from a specific subpath by mirroring the directory structure within the asset directory and using Wrangler configuration.

When To Use

Use when you need to host static files under a specific subdirectory of your domain rather than at the root level using Cloudflare Workers assets.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-static-assets-routing-serving-a-subdirectory-workflow-guide.mdA guide explaining how to configure Cloudflare Workers to serve static assets from a specific subdirectory using Wrangler.Questions about a guide explaining how to configure Cloudflare Workers to serve static assets from a specific subdirectory using Wran...
examples/workers-static-assets-routing-serving-a-subdirectory-cloudflare-workers-.textA wrangler.toml configuration file demonstrating how to route static assets to a specific subdirectory using the assets field.Exact payloads, commands, or snippets shown in A wrangler.toml configuration file demonstrating how to route static assets to a specific subdirectory using the asse...
examples/workers-static-assets-routing-serving-a-subdirectory-cloudflare-workers--2.textA wrangler configuration file demonstrating how to route static assets to a specific subdirectory path.Exact payloads, commands, or snippets shown in A wrangler configuration file demonstrating how to route static assets to a specific subdirectory path.

What This Skill Covers

  • This feature requires Wrangler v3.98.0 or later.

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/routing/advanced/serving-a-subdirectory