Cloudflare 中文文档
Cloudflare for Platforms
Cloudflare for Platforms
编辑这个页面
跳转官方原文档
Set theme to dark (⇧+D)

User Worker metadata

You define the Worker’s metadata as part of the multipart upload of user Workers. This metadata defines the Workers’configuration analogue to the wrangler.toml file for regular Workers.

​​ Sample metadata.json

​​ Attributes

The following attributes are configurable at the top-level.

  • main_module string required

    • The path to the module entry point of the user Worker that will be executed. For example, main.js.
  • bindings object optional

    • The bindings for the user Worker to enable interactions with other resources.

​​ Bindings

Analogue to regular Workers, user Workers can also interact with other Cloudflare resources using Bindings. Refer to metadata.json example and the Wrangler configuration documentation for more information.