Mark Pitt
claude-skills
  1. claude-skills
  2. Developer environment
  3. cloudflare-workers-static-site
  4. templates/wrangler.with-worker.jsonc

A file in cloudflare-workers-static-site

templates/wrangler.with-worker.jsonc

JSON 18 lines 699 B
wrangler.with-worker.jsoncJSON, shown as text and never run
{
  "$schema": "./node_modules/wrangler/config-schema.json",
  "name": "<worker-name>",
  "compatibility_date": "<YYYY-MM-DD>",
  // The Worker only runs for the paths in run_worker_first. Every other
  // request is a static asset, which stays free and unlimited.
  "main": "./worker/index.ts",
  "assets": {
    "directory": "./dist",
    "binding": "ASSETS",
    "not_found_handling": "404-page",
    "run_worker_first": ["/api/*"]
  },
  // Example binding. With no database_id, Wrangler creates the database on
  // first deploy and keeps it linked. Delete if not needed.
  // "d1_databases": [{ "binding": "DB", "database_name": "<worker-name>-db" }],
  "observability": { "enabled": true }
}