Files
cloudflare-experiment/README.md

1.1 KiB

Cloudflare Experiment — minimal site + Workers scaffold

This repository contains a minimal static site and a small Workers scaffold so you can try both Cloudflare Pages and Cloudflare Workers/Wrangler deployments.

Quick commands

  • Serve locally (simple):
python -m http.server 8000
# open http://localhost:8000
  • Cloudflare Pages (quick):
  1. Push this repo to GitHub/GitLab/Bitbucket.
  2. In the Cloudflare dashboard → PagesCreate a project, connect your repo, set the build/publish directory (for this repo: .), and deploy.
  3. Use the provided <project>.pages.dev domain, or add a custom domain in the Pages project settings.
  • Cloudflare Workers + Wrangler (quick):
# Install wrangler (if needed)
npm install -g wrangler
wrangler login
# Start local dev for the worker
cd worker
wrangler dev
# Publish the worker to workers.dev (requires account_id in wrangler.toml or interactive auth)
wrangler publish

Notes

  • Replace placeholders in wrangler.toml with your account_id and optionally zone_id when mapping to a custom domain.
  • For Pages, no Cloudflare account-level secret is needed; connect via the dashboard.