first commit

This commit is contained in:
浪子
2026-01-05 19:51:09 +08:00
commit 2d8303808d
15 changed files with 2596 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
import { handleApi, type ApiEnv } from "../src/api";
export const onRequest: PagesFunction<ApiEnv> = async (context) => {
const url = new URL(context.request.url);
if (url.pathname.startsWith("/api/")) {
return handleApi(context.request, context.env);
}
return context.next();
};