The ctx.exports API contains automatically-configured bindings corresponding to your Worker’s top-level exports. For each top-level export extending WorkerEntrypoint, ctx.exports will contain a Service Binding by the same name, and for each export extending DurableObject (and for which storage has been configured via a migration), ctx.exports will contain a Durable Object namespace binding. This means you no longer have to configure these bindings explicitly in wrangler.jsonc/wrangler.toml.
Example:
import { WorkerEntrypoint } from "cloudflare:workers";
export class Greeter extends WorkerEntrypoint { greet(name) { return `Hello, ${name}!`; }}
export default { async fetch(request, env, ctx) { let greeting = await ctx.exports.Greeter.greet("World") return new Response(greeting); }}At present, you must use the enable_ctx_exports compatibility flag to enable this API, though it will be on by default in the future.
See the API reference for more information.
Source: Cloudflare
Latest Posts
- Microsoft Teams: AI-powered notes for in-person meetings with Facilitator in Teams Rooms on Windows [MC1307512]
![Microsoft Teams: AI-powered notes for in-person meetings with Facilitator in Teams Rooms on Windows [MC1307512] 2 pexels steve 27594600](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- Dynamics 365 Customer Service- Estimate AI credits for agents from forecasted demand [MC1307183]
![Dynamics 365 Customer Service- Estimate AI credits for agents from forecasted demand [MC1307183] 3 pexels cottonbro 5054213](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- Microsoft Power Automate – Automate administrator-level desktop applications in unattended runs [MC1307177]
![Microsoft Power Automate - Automate administrator-level desktop applications in unattended runs [MC1307177] 4 pexels pixabay 267961](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- Microsoft Dataverse – Create Dataverse agent users with Microsoft Entra agent identity [MC1307182]
![Microsoft Dataverse - Create Dataverse agent users with Microsoft Entra agent identity [MC1307182] 5 pexels anniroenkae 15578416](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)

![Microsoft Teams: AI-powered notes for in-person meetings with Facilitator in Teams Rooms on Windows [MC1307512] 2 pexels steve 27594600](https://mwpro.co.uk/wp-content/uploads/2024/08/pexels-steve-27594600-150x150.webp)
![Dynamics 365 Customer Service- Estimate AI credits for agents from forecasted demand [MC1307183] 3 pexels cottonbro 5054213](https://mwpro.co.uk/wp-content/uploads/2025/06/pexels-cottonbro-5054213-150x150.webp)
![Microsoft Power Automate - Automate administrator-level desktop applications in unattended runs [MC1307177] 4 pexels pixabay 267961](https://mwpro.co.uk/wp-content/uploads/2024/08/pexels-pixabay-267961-150x150.webp)
![Microsoft Dataverse - Create Dataverse agent users with Microsoft Entra agent identity [MC1307182] 5 pexels anniroenkae 15578416](https://mwpro.co.uk/wp-content/uploads/2025/06/pexels-anniroenkae-15578416-150x150.webp)
