initial commit

This commit is contained in:
2026-02-08 20:28:46 +05:30
commit c316b759c3
23 changed files with 1839 additions and 0 deletions

25
src/routes/api.$.ts Normal file
View File

@@ -0,0 +1,25 @@
import { createFileRoute } from "@tanstack/react-router";
import { config } from "@/bknd";
import { serve } from "bknd/adapter/nextjs";
const handler = serve({
...config,
// cleanRequest: {
// depending on what name you used for the catch-all route,
// you need to change this to clean it from the request.
// searchParams: ["$"],
// },
});
export const Route = createFileRoute("/api/$")({
server: {
handlers: {
ANY: async ({ request }) => {
const res = await handler(request);
// console.log("[API] ", res);
return res;
},
},
},
});