mirror of
https://github.com/FranP-code/spooky-spotify-showcase.git
synced 2025-10-13 00:02:36 +00:00
31 lines
789 B
TypeScript
31 lines
789 B
TypeScript
import { postRouter } from "@/server/api/routers/post";
|
|
import { createCallerFactory, createTRPCRouter } from "@/server/api/trpc";
|
|
import * as cloudinary from "cloudinary";
|
|
import { entryRouter } from "./routers/entry";
|
|
|
|
cloudinary.v2.config({
|
|
secure: true,
|
|
});
|
|
|
|
/**
|
|
* This is the primary router for your server.
|
|
*
|
|
* All routers added in /api/routers should be manually added here.
|
|
*/
|
|
export const appRouter = createTRPCRouter({
|
|
post: postRouter,
|
|
entry: entryRouter,
|
|
});
|
|
|
|
// 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);
|