Add tutorials for cloudflare workers with wrangler#3055
Conversation
fibibot
left a comment
There was a problem hiding this comment.
Thanks for the contribution. A few blockers before this can land:
- Line 85:
[esbuild tutorial](https://www.google.com/search?q=/examples/esbuild/)is a Google search URL — likely an LLM artifact. There's also no/examples/esbuild/page in this repo. Either link to a real internal page or drop the sentence. - The new page isn't registered in
examples/_data.ts. The existing CF tutorial sits at line 557 (/examples/cloudflare_workers_tutorial/); add a sibling entry for/examples/cloudflare_workers_wrangler_tutorial/so it shows in the sidebar. deno wrangler dev/deno wrangler types(tasks at lines 52–54) anddeno --allow-env --allow-run wrangler deploy(line 51) aren't valid invocations — Deno has nowranglersubcommand. Afterdeno add npm:wrangler, run it viadeno run -A npm:wrangler dev(or use the binary thatdeno installexposes). Please fix these so a reader runningdeno task devactually starts Wrangler.- Line 76:
satisfies ExportHandler<Env>— Cloudflare's exported type isExportedHandler<Env>(with the "ed"). Can you confirm this compiles against thecf-typegenoutput?
- nit:
devandstarttasks (lines 52–53) are duplicates — pick one. - nit: title doesn't follow
docs: ...lowercase format the repo uses, but maintainer can squash.
|
@fibibot |
fibibot
left a comment
There was a problem hiding this comment.
Thanks for confirming. The existing request-changes review still applies until a new commit updates the invalid Google link, the missing sidebar entry, the Wrangler command invocations, and ExportedHandler<Env> type; I’ll re-review the changed revision when it lands.
lunadogbot
left a comment
There was a problem hiding this comment.
Several examples on this page are not runnable yet, and the new tutorial is not wired into the examples navigation.
"dev": "deno wrangler dev"/"cf-typegen": "deno wrangler types"use a nonexistent Deno subcommand; on Deno 2.7.14 this resolveswrangleras a local file and exitsModule not found ".../wrangler". Usedeno run -A npm:wrangler ...or document thenode_modules/.binpath that makes the binary available.} satisfies ExportHandler<Env>;should beExportedHandler<Env>;cf-typegenemits Cloudflare'sExportedHandler, so the copied sample will not type-check as written.[esbuild tutorial](https://www.google.com/search?q=/examples/esbuild/)is a search URL, and there is no/examples/esbuild/page in this repo. Link to a real page or remove the sentence./examples/cloudflare_workers_wrangler_tutorial/is not added toexamples/_data.ts, so the page will not show in the examples sidebar next to the existing Cloudflare Workers tutorial.
Add a tutorial on deploying to Cloudflare Workers using wrangler.