Nacho
Explore posts from serversCalls to specific table not working in production, fine locally
I am having a strange issue since yesterday. I am using nextjs TRPC and Prisma to connect to a planetscale DB. Since yesterday calls to a specific table are not working in production. All other calls are fine.
I'm not getting any errors, the call is just never resolving. It doesn't fail or succeed, it never even gets a status code if I check it in the network tab.
1 replies
TTCTheo's Typesafe Cult
•Created by Nacho on 10/4/2023 in #questions
Strange vercel/trpc/prisma/planetscale issue
For some reason suddenly a specific table (employees) can't be accessed in production.
Locally everything works fine, I get all my data etc but if I go to the deployed app online it's like the trpc/prisma call is not going through.
I'm not seeing a status (eg 200) in the network explorer either, it just stays empty. I see the query in planetscale logs as succesfull but it's like I'm never actually getting a response. I don't see any errors in the vercel logs. All other calls go through just fine.
Has anyone had this issue before?
Has anyone had this issue before?
2 replies
TTCTheo's Typesafe Cult
•Created by Nacho on 4/19/2023 in #questions
Best way to handle env variables in nextjs 13
So we need to go further than the standard dev/test/prod env variable options, for instance we have 3 different staging environments that all use different endpoints. What would be the best way to handle this? I've done some research and have found several options, but I was wondering if anyone has hands-on experience with this scenario and can recommend an approach.
2 replies
TTCTheo's Typesafe Cult
•Created by Nacho on 3/10/2023 in #questions
Zod naming convention
What is the best naming convention for zod?
both capitalized
const Object = z.object(...)
type Object = z.infer<...>
-or-
only type capitalized
const object = z.object(...)
type Object = z.infer<...>
12 replies
TTCTheo's Typesafe Cult
•Created by Nacho on 2/14/2023 in #questions
Using create-t3-app for a websocket heavy app / proxying api requests
So at work we're looking to rebuild our frontend (a stock trading application) from scratch, it's currently made with angularjs (I know). So I was looking into t3-stack/next.js as a possible new stack.
However there's a few caveats, my team is pretty adamant on using RTK Query because of the logging that RTK offers. Also most of our data comes from a 3rd party websocket, and I was wondering if it is even worth using next.js if most of your data comes from a websocket.
Also, all of this is moot because I can't seem to get proxying to work, I need to proxy our api calls because of cors issues when running in local dev. I have both tried the http-proxy-middleware and the rewrites option in next.utils.js, and it doesn't seem to be triggering, all my axios calls are still going out to 'localhost:3000/api/whatever'. If anyone had a suggestion or example of proxying in next.js it would be appreciated
6 replies