Aleph
Aleph8mo ago

1 trpc api server for 1 or many clients.

I'm a beginner, working on two monorepo projects that resides on the same folder, each of which with trpc (next) already setup. Both projects basically uses the same api, and what I've been doing currently is manually copying the routes from one project to another and run the server on the project where i'm running the client. I wanted to run the server on one project and have the other project connect to it as well, so I would no longer keep on switching servers cause most of the time I need the clients of two projects to run at the same time. Is this feasible, and if so, what's the optimal approach?
1 Reply
isaac_way
isaac_way8mo ago
put them into the same monorepo