Skip to content
open-computeopen-computeopen-compute

Routing

ocd wrangler deploy 在所选平台上激活部署。默认本机 origin 是 http://127.0.0.1:8787;Worker 在绑定的 platform_path 提供服务。

Terminal window
ocd wrangler --project examples/hello-worker deploy --env dev
# Worker is serving at http://127.0.0.1:8787/<path>

HTTP 请求到达绑定了该 Worker 的路径后,由 fetch handler 处理。Static Assets 的 HTML trailing-slash / SPA / Worker-first 路由概念与 Cloudflare Static Assets routing 对齐,见 Static Assets

主题 Cloudflare open-compute
绑定路径上的 HTTP 由 fetch 处理
Static Assets HTML trailing-slash / SPA / Worker-first 是,见 Static Assets
Custom Domains 不提供
workers.dev 不提供
Cloudflare zone Routes / Page Rules 不提供
项目文件中的 routes / workers_dev 不允许
预览 URL *.workers.dev / Cloudflare preview 不提供;调用已配置的 platform path
部署与路由数据源 Cloudflare 控制面 本机 SQLite;ocd 监督当前 workerd 进程