Best practice on running tRPC in a monorepo.
In create-t3-turbo I noticed that what actually runs the tRPC sever is the nextjs app inside the apps folder.
Meaning that the package api dose not run by itself and depends on it.
If I got it right, what happens when you have multiple web applications consuming the same api? Isn’t it best practice to isolate it to its on service?
1 Reply
Link to create-t3-turbo nextjs file that implements the api:
https://github.com/t3-oss/create-t3-turbo/blob/main/apps/nextjs/src/pages/api/trpc/%5Btrpc%5D.ts
GitHub
create-t3-turbo/[trpc].ts at main · t3-oss/create-t3-turbo
Clean and simple starter repo using the T3 Stack along with Expo React Native - create-t3-turbo/[trpc].ts at main · t3-oss/create-t3-turbo