Help to deploy my TRPC proj from a monorepo (turborepo) at Vercel

I'm trying to learn monorepo with TRPC, both are new for me and Im kind struggling to deploy it because Im super newbie in deployments. I have a turborepo with two apps, one is my react app and other one is my node server in express + TRPC. I dont know if I did correctly but I went to vercel and Ive choose the FE project; for the build options I left what had there already, seems Vercel knows what to do when its turbo repo and it went all good!! In my head I had to make a separate new deploy from the same repo but choose the server (express + trpc), and then with my new service up and running set the env variable with the server url on the FE proj and all done. the thing is, I didnt found the node/express option on Vercel, and somehow I think I shouldnt deploy them separately. I dont know well how turborepo works and it sounds a bad place to ask help but thats what I got. Thanks all!
6 Replies
kevinka
kevinkaOP2y ago
up ;-;
Mendy
Mendy2y ago
I just asked a similar question from a different point of view, maybe help will come from there. Will be watching here as well. The question is how should a monorepo trpc api be deployed.
kevinka
kevinkaOP2y ago
should answer mine too! maybe understanding how turbo build and runs should solve, I notice when we run turbo run dev for example it didn't initialize automatically like the build which is detected
Mendy
Mendy2y ago
Look at this example: https://github.com/lukevella/rallly They are using tRPC in a monorepo, and they’ve deployed the tRPC in a backend server via nextjs. (See packages/backend) Then in the FE its easy to use it again (See apps/web/src/pages/api/trpc)
GitHub
GitHub - lukevella/rallly: Rallly is an open-source scheduling and ...
Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier. - GitHub - lukevella/rallly: Rallly is an open-source scheduling and collaboration...
kevinka
kevinkaOP2y ago
what Im looking for is deploy an server separately using trpc. Im not using next in my case did you found anything @Mendy ?
Want results from more Discord servers?
Add your server