mirror of
https://github.com/khairul169/code-share.git
synced 2025-04-29 00:59:37 +07:00
13 lines
386 B
TypeScript
13 lines
386 B
TypeScript
import { createContext } from "./context";
|
|
import { appRouter } from "../../routers/_app";
|
|
import { createCallerFactory } from ".";
|
|
import { PageContext } from "vike/types";
|
|
|
|
const trpcServer = async (ctx: PageContext) => {
|
|
const createCaller = createCallerFactory(appRouter);
|
|
const context = await createContext(ctx);
|
|
return createCaller(context);
|
|
};
|
|
|
|
export default trpcServer;
|