add: example for tanstack start

This commit is contained in:
2026-02-11 21:41:26 +05:30
parent 6288faef33
commit 01483b912f
29 changed files with 905 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
import config from "../bknd.config";
import { getApp } from "bknd/adapter/tanstack-start";
export async function getApi({
headers,
verify,
}: {
verify?: boolean;
headers?: Headers;
}) {
const app = await getApp(config, process.env);
if (verify) {
const api = app.getApi({ headers });
await api.verifyAuth();
return api;
}
return app.getApi();
}