summaryrefslogtreecommitdiff
path: root/src/worker.ts
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2025-10-03 11:52:01 +0200
committerYuval Adam <_@yuv.al>2025-10-03 11:52:01 +0200
commit7b6314f480d4f7a0932d6463e5341e21566a37c2 (patch)
tree852174e337af4ec373e966b642dc59ca0a7e5c74 /src/worker.ts
parentdc4d65708c92cba5652597af8eb49d1297026e15 (diff)
Implement loading of unauthenticated radar GIS images
Diffstat (limited to 'src/worker.ts')
-rw-r--r--src/worker.ts18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/worker.ts b/src/worker.ts
new file mode 100644
index 0000000..e982634
--- /dev/null
+++ b/src/worker.ts
@@ -0,0 +1,18 @@
+import type { SSRManifest } from 'astro';
+import { App } from 'astro/app';
+import { handle } from '@astrojs/cloudflare/handler';
+import { handleSchedule } from './functions/scheduled';
+
+export function createExports(manifest: SSRManifest) {
+ const app = new App(manifest);
+ return {
+ default: {
+ async fetch(request, env, ctx) {
+ return handle(manifest, app, request, env, ctx);
+ },
+ async scheduled(controller, env, ctx) {
+ return await handleSchedule(controller, env, ctx);
+ }
+ }
+ };
+}