The site is static and hosted on GitHub Pages. The "Report wrong info" form and the /admin page talk to a
small Cloudflare Worker (worker/index.js, free tier) that stores reports and checks the admin password.
- Site:
python -m http.server 8765, then open http://localhost:8765 - Report API:
npx wrangler dev --port 8787with a.dev.varsfile containingADMIN_PASSWORD=something(a throwaway password, never your real one), and temporarily setmeta.apiBaseindata/providers.jsontohttp://127.0.0.1:8787.
npx wrangler loginnpx wrangler kv namespace create REPORTSand paste the printedidintowrangler.tomlnpx wrangler secret put ADMIN_PASSWORDand type your admin passwordnpx wrangler deploy(it prints a URL likehttps://cloud-comparison-api.<you>.workers.dev)- Put that URL in
data/providers.jsonasmeta.apiBase, commit and push
Run npx wrangler deploy again only when worker/index.js changes. The site itself keeps deploying through
GitHub Pages as usual.
Reports show up at https://sschre.github.io/cloud-comparison/admin/.
If the site moves to another address, add it to ALLOWED_ORIGINS in wrangler.toml and redeploy.