import { env, waitUntil } from 'cloudflare:workers';import { createApplication } from '@setu-ts/kernel';import { RuntimePlugin } from '@setu-ts/runtime';import { CloudflarePlugin } from '@setu-ts/cloudflare-plugin';const app = createApplication({ plugins: [ RuntimePlugin({ env }), CloudflarePlugin({ env, waitUntil, cache: { binding: 'CACHE_KV', prefix: 'cache:' } }), ],});await app.start();export default { fetch: app.fetch }; Copy
import { env, waitUntil } from 'cloudflare:workers';import { createApplication } from '@setu-ts/kernel';import { RuntimePlugin } from '@setu-ts/runtime';import { CloudflarePlugin } from '@setu-ts/cloudflare-plugin';const app = createApplication({ plugins: [ RuntimePlugin({ env }), CloudflarePlugin({ env, waitUntil, cache: { binding: 'CACHE_KV', prefix: 'cache:' } }), ],});await app.start();export default { fetch: app.fetch };
Example