Blog

Edge workers: run a Cloudflare Workers compatible module on this server

How to deploy a Cloudflare Workers compatible module with a default export on AI Hosting Panel, set its name, compatibility date and bindings, and keep secrets out of the code.

Edge workers: run a Cloudflare Workers compatible module on this server

2026-11-22

Edge workers run a module on this server that works the way a Cloudflare Worker does: an ES module with a default export that receives each request. Each worker has a name, a compatibility date, its code and its bindings.

Deploy a worker

  1. Open Hosting in the sidebar, then Edge Workers.
  2. Type a Name, for example shop.
  3. Keep the Compatibility date, or change it.
  4. Paste the code into Code: an ES module with a default export. The box starts with an example that returns a plain-text reply.
  5. Type the Bindings, one per line as NAME=value, if the code needs them.
  6. Press Deploy worker.
Edge workers page with the New worker form: name, compatibility date, code and bindings
The Edge workers page: the worker form with the name, the compatibility date, the code and the bindings.

Bindings are values, not code

A binding is a value the code reads from its environment, such as an API key. Put secrets in the bindings, and keep them out of the code itself. The example in the page shows the form, not a real value.

All posts