tRPC 초기 설정

This commit is contained in:
static
2025-11-02 23:09:01 +09:00
parent 328baba395
commit 7779910949
7 changed files with 97 additions and 12 deletions

13
src/trpc/router.server.ts Normal file
View File

@@ -0,0 +1,13 @@
import type { RequestEvent } from "@sveltejs/kit";
import type { inferRouterInputs, inferRouterOutputs } from "@trpc/server";
import { createContext, router } from "./init.server";
export const appRouter = router({
// TODO
});
export const createCaller = (event: RequestEvent) => appRouter.createCaller(createContext(event));
export type AppRouter = typeof appRouter;
export type RouterInputs = inferRouterInputs<AppRouter>;
export type RouterOutputs = inferRouterOutputs<AppRouter>;