Skip to content

docs(router): add the quickstart - #87

Open
dreyfus92 wants to merge 1 commit into
docs-router-wiringfrom
docs-router-quickstart
Open

dreyfus92 wants to merge 1 commit into
docs-router-wiringfrom
docs-router-quickstart

Conversation

@dreyfus92

Copy link
Copy Markdown
Member

What does this PR do?

third pr of the router docs stack, stacked on #85. adds the quickstart: define the routes of a small cli, parse argv into a typed intent, and dispatch on it.

Type of change

  • Typo
  • New Documentation for Feature
  • Improvement for Clarification
  • Chore (dependencies, CI, tooling)

AI-generated code disclosure

  • This PR includes AI-generated code

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bombsh-docs-router db2aaba Commit Preview URL

Branch Preview URL
Oct 08 2026, 02:01 AM

@dreyfus92
dreyfus92 added this pull request to stack #86 October 8, 2026 01:21
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bombshell-docs db2aaba Commit Preview URL

Branch Preview URL
Oct 08 2026, 02:01 AM

Comment on lines +34 to +48
routes(
command(
name("serve"),
option(name("port"), schema(z.number().default(4000))),
),
route(
name("database"),
routes(
command(
name("clean"),
toggle(name("dryRun")),
),
),
),
),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is more as a note, I think we should allow embedding route() directly in another route() rather than forcing you to have a routes() wrapper.

@cowboyd cowboyd left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if going with a CLI that folks already know that has well known options and commands might lower the friction to understanding. Like the gh cli or the aws cli which is what I used in the blog post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants