add: agnostic web compliant adapter

This commit is contained in:
2026-04-04 00:27:29 +05:30
parent 8a90b9356b
commit 54aae56734
41 changed files with 1534 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
import { createBknd } from "bknd/adapter/web";
import bkndConfig from "../../bknd.config";
import type { EnvGetter } from "@builder.io/qwik-city/middleware/request-handler";
export const getApp = async (env?: EnvGetter) => createBknd({ mode: "standalone", options: bkndConfig }, env);
export const handler = async (req: Request, env?: EnvGetter) => {
return (await getApp(env)).serve()(req);
};
export const getApi = async (opts?: { headers?: Headers; verify?: boolean }) => {
return (await getApp()).getApi(opts);
};