Experiments with tRPC and Nuxt Server API
This commit is contained in:
9
server/trpc/init.ts
Normal file
9
server/trpc/init.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { initTRPC } from '@trpc/server';
|
||||
|
||||
// You can use any variable name you like.
|
||||
// We use t to keep things simple.
|
||||
const t = initTRPC.create();
|
||||
|
||||
export const router = t.router; // createTRPCRouter
|
||||
export const createCallerFactory = t.createCallerFactory;
|
||||
export const publicProcedure = t.procedure; // baseProcedure
|
||||
Reference in New Issue
Block a user