patterns.md

Created about 12 hours ago

attributes
source_pathreferences/pages-functions/patterns.md
source_sha256413851b9fd542bd242d6b4f663da35012cdcf13175b0536930ce55c174b85a0b
source_urlhttps://github.com/cloudflare/skills/blob/47dfc2ce969bf62acf8bc231198ade4bb02712e0/skills/cloudflare/references/pages-functions/patterns.md
supporting_skill_id40184
upstream_revision47dfc2ce969bf62acf8bc231198ade4bb02712e0

Pages Functions Request Design

Choose where behavior belongs before adapting an example.

Task Documentation
Share authentication, logging, and error handling Middleware
Choose request handlers and asynchronous completion behavior API reference
Keep asset requests outside Function invocation where appropriate Routing
Use custom or framework-generated routing Advanced mode
Integrate storage or another service Bindings
Exercise the assembled application locally Local development

Define the response owner and middleware scope before adding authentication or response transformations. Test protected routes, rejected requests, and static fallbacks together. Choose consistency and concurrency requirements before using storage for session state or rate limiting; a generic read-modify-write example is not a complete policy.

See Pages project decisions for framework and migration work.

Children

No children yet.

Like how this is organised?

Build your own Memory tree on knowen.md: notes, decisions and tasks in one connected markdown graph, shared with your team and your AI agents.