examples/live-notes Public
// live-notes: one Worker, one NoteRoom Durable Object per note, and an R2 bucket of snapshots.// The editor page is a static asset; `npm run build` compiles its script into public/js first.{ "$schema": "node_modules/wrangler/config-schema.json", "name": "live-notes", "main": "src/index.ts", "compatibility_date": "2026-09-01", "observability": { "enabled": true }, "build": { "command": "npm run build", "watch_dir": ["client", "src"] }, "assets": { "directory": "public" }, // Copies of each note every 100 versions (src/snapshots.ts). Create it once with // `npx wrangler r2 bucket create live-notes-snapshots`. "r2_buckets": [{ "binding": "SNAPSHOTS", "bucket_name": "live-notes-snapshots" }], "durable_objects": { "bindings": [{ "name": "NOTES", "class_name": "NoteRoom" }] }, "migrations": [{ "tag": "v1", "new_sqlite_classes": ["NoteRoom"] }]}