Server Setup

Initialize tRPC with initTRPC.create(), define routers with t.router(), create procedures with .query()/.mutation()/.subscription(), configure context with createContext(), export AppRouter type, merge routers with t.mergeRouters(), lazy-load routers with lazy().

trpc 726c9be 8.4 KB Updated

File contents

trpc/trpc/tree/main/packages/server/skills/server-setup commit 726c9bebc2

Frequently asked questions

npx skillmds add trpc/server-setup