1.1 KiB
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):
- Push this repo to GitHub/GitLab/Bitbucket.
- In the Cloudflare dashboard → Pages → Create a project, connect your repo, set the build/publish directory (for this repo:
.), and deploy. - Use the provided
<project>.pages.devdomain, 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.tomlwith youraccount_idand optionallyzone_idwhen mapping to a custom domain. - For Pages, no Cloudflare account-level secret is needed; connect via the dashboard.