Develop a Pages app locally with bindings
local dev
// what it does
Serves your built Pages output plus Functions locally, wiring up KV/D1/R2 and plain vars so full-stack routes work offline. --live-reload refreshes the browser on each rebuild.
// shell
$ wrangler pages dev ./dist --kv CACHE --d1 DB --r2 BUCKET --binding API_URL=http://localhost:3000 --live-reload// gotcha
You pass the binding NAME, not a namespace or bucket id — pages dev uses local simulated storage. Point the directory at your build output (./dist), not your source tree.