Move to Deno+Bunny.net, add a way to test webring locally.

This commit is contained in:
DS 2025-02-23 23:47:07 -08:00
parent 9f66f0b37b
commit 8670aa3412
33 changed files with 599 additions and 3360 deletions

16
bunny/webring.ts Normal file
View file

@ -0,0 +1,16 @@
import * as BunnySDK from '@bunny.net/edgescript-sdk';
import { handleFunctions } from '../src/main.ts';
BunnySDK.net.http
.servePullZone({ url: 'https://akols.com' })
.onOriginRequest(
(ctx: { request: Request }): Promise<Request> | Promise<Response> => {
const funcResp = handleFunctions(ctx.request);
if (funcResp !== undefined) {
return Promise.resolve(funcResp);
}
return Promise.resolve(ctx.request);
}
);