this repo has no description
at master 634 B view raw
1import { postRouter } from "~/server/api/routers/post"; 2import { createCallerFactory, createTRPCRouter } from "~/server/api/trpc"; 3 4/** 5 * This is the primary router for your server. 6 * 7 * All routers added in /api/routers should be manually added here. 8 */ 9export const appRouter = createTRPCRouter({ 10 post: postRouter, 11}); 12 13// export type definition of API 14export type AppRouter = typeof appRouter; 15 16/** 17 * Create a server-side caller for the tRPC API. 18 * @example 19 * const trpc = createCaller(createContext); 20 * const res = await trpc.post.all(); 21 * ^? Post[] 22 */ 23export const createCaller = createCallerFactory(appRouter);