You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The worker generated by the Cloudflare adapter only exports [a fetch handler](https://developers.cloudflare.com/workers/runtime-apis/handlers/fetch/).
4
+
5
+
Sometimes your application needs to expose another type of handler (i.e. [a scheduled handler](https://developers.cloudflare.com/workers/runtime-apis/handlers/scheduled/)) or export a [Durable Object](https://developers.cloudflare.com/durable-objects/api/base/). This can be achieved by creating a custom worker.
6
+
7
+
The custom worker re-uses the generated fetch handler.
8
+
9
+
### Create your custom worker Worker
10
+
11
+
The following custom worker re-uses the generated fetch handler and adds a scheduled handler:
12
+
13
+
```ts
14
+
// custom-worker.ts
15
+
16
+
// @ts-ignore `.open-next/worker.ts` is generated at build time
0 commit comments