Initial scaffold: Cloudflare Pages + Worker + README + wrangler

This commit is contained in:
Kenji Morishige
2026-06-09 20:18:25 -05:00
commit 6499daadb1
5 changed files with 80 additions and 0 deletions

32
README.md Normal file
View File

@@ -0,0 +1,32 @@
# 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):
```bash
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 → **Pages****Create 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):
```bash
# 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.