Jack Delamou
Jack Delamou4d ago

Nextjs SSR

Hey everyone! I’m pretty new to this way of building APIs. Is it possible to use tRPC to create type-safe APIs with Next.js (using React Query + prefetch) while having a separate Node.js backend inside the same monorepo?
2 Replies
Nick
Nick4d ago
Yep should be fine to separate out the server, a lot of the guides you'll see host tRPC inside next's API layer just because it exists, but it essentially still has a client and a server so you can just follow the client setup guide for nextjs and ignore mounting tRPC on next's API layer
Jack Delamou
Jack DelamouOP4d ago
Ahh Thanks for that tips

Did you find this page helpful?