NicoFish
NicoFish
TtRPC
Created by NicoFish on 4/28/2024 in #❓-help
Change db url in ctx with an API call
I want to have a switch in my frontend to change from dev db to prod db. I'm using prisma. Have 2 prisma instances (one for prod and the other for dev). Is there any way to override the prisma instance in the ctx with an API call?
4 replies
TtRPC
Created by NicoFish on 4/4/2024 in #❓-help
Trouble with Vercel and deployment URL
Hey I've been having a problem with nextjs deploying to vercel. In localhost the calls to the backend are done correctly, but when deployed, the calls are made to https://myvercelurl.vercel.app/deployment_url/api/trpc/.... I don't know why the hell the deployment_url is inserted there. Running in npm, packages: @trpc/client: ^10.45.0 => 10.45.1 @trpc/next: ^10.45.0 => 10.45.1 @trpc/react-query: ^10.45.0 => 10.45.1 @trpc/server: ^10.45.0 => 10.45.1 next: 14.1.0 => 14.1.0 react: ^18 => 18.2.0 typescript: ^5 => 5.3.3 If someone could help me I will really appreciate it
1 replies