Files
ProxmoxVE-Local/src/server/api/root.ts
Rögl-Brunner Michel 6ee5c5c017 PoC
2025-09-09 14:24:36 +02:00

24 lines
646 B
TypeScript

import { scriptsRouter } from "~/server/api/routers/scripts";
import { createCallerFactory, createTRPCRouter } from "~/server/api/trpc";
/**
* This is the primary router for your server.
*
* All routers added in /api/routers should be manually added here.
*/
export const appRouter = createTRPCRouter({
scripts: scriptsRouter,
});
// export type definition of API
export type AppRouter = typeof appRouter;
/**
* Create a server-side caller for the tRPC API.
* @example
* const trpc = createCaller(createContext);
* const res = await trpc.post.all();
* ^? Post[]
*/
export const createCaller = createCallerFactory(appRouter);