trpc demo

This commit is contained in:
2025-04-12 01:49:57 +02:00
parent 41059d9396
commit 10d1c91dea
15 changed files with 255 additions and 30 deletions

View File

@@ -0,0 +1,10 @@
import { fetchRequestHandler } from '@trpc/server/adapters/fetch'
import { trpcRouter } from '~/server/routers/_app'
const handler = (req: Request) => fetchRequestHandler({
endpoint: "/api/trpc",
req,
router: trpcRouter,
createContext: () => ({}),
});
export {handler as GET, handler as POST}