feat(WEB-127): add trpc to handle requests both serverside and clientside
This commit is contained in:
9
lib/trpc/server.ts
Normal file
9
lib/trpc/server.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { appRouter } from "@/server"
|
||||
import { createContext } from "@/server/context"
|
||||
import { createCallerFactory } from "@/server/trpc"
|
||||
|
||||
const createCaller = createCallerFactory(appRouter)
|
||||
|
||||
export function serverClient() {
|
||||
return createCaller(createContext())
|
||||
}
|
||||
Reference in New Issue
Block a user