# CloudflareDeployer The `CloudflareDeployer` class handles deployment of standalone Mastra applications to Cloudflare Workers. It manages configuration, deployment, and extends the base [Deployer](https://mastra.ai/reference/deployer/llms.txt) class with Cloudflare specific functionality. ## Usage example ```typescript import { Mastra } from "@mastra/core"; import { CloudflareDeployer } from "@mastra/deployer-cloudflare"; export const mastra = new Mastra({ deployer: new CloudflareDeployer({ name: "hello-mastra", routes: [ { pattern: "example.com/*", zone_name: "example.com", custom_domain: true } ], vars: { NODE_ENV: "production", API_KEY: "" }, d1_databases: [ { binding: "DB", database_name: "my-database", database_id: "d1-database-id", preview_database_id: "your-preview-database-id" } ], kv_namespaces: [ { binding: "CACHE", id: "kv-namespace-id" } ] }) }); ``` ## Constructor options The `CloudflareDeployer` constructor accepts the same configuration options as `wrangler.json`. See the [Wrangler configuration documentation](https://developers.cloudflare.com/workers/wrangler/configuration/) for all available options. ### Migrating from earlier versions The following fields are deprecated and should be replaced with their standard `wrangler.json` equivalents: | Deprecated | Use instead | | ----------------- | --------------------------- | | `projectName` | `name` | | `d1Databases` | `d1_databases` | | `kvNamespaces` | `kv_namespaces` | | `workerNamespace` | _(removed, no longer used)_ |