mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-03 08:36:01 +00:00
add: example for tanstack start
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { createFileRoute } from "@tanstack/react-router";
|
||||
import config from "../../bknd.config";
|
||||
import { serve } from "bknd/adapter/tanstack-start";
|
||||
|
||||
const handler = serve(config);
|
||||
|
||||
export const Route = createFileRoute("/api/$")({
|
||||
server: {
|
||||
handlers: {
|
||||
ANY: async ({ request }) => await handler(request),
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user