4b47
TTCTheo's Typesafe Cult
•Created by 4b47 on 2/9/2025 in #questions
Fetching data after Vercel deploy
Hey guys i got a question. I'm just learning to build fullstack app with next.js drizzle and neon. I configured it and everything works fine locally, but after vercel deploy, with same database url connection , it seems to be only fetching on the build time, and when i add records after that it doesnt fetch before redeploy. Why is that happening? I'm using newest version of next. And i just fetch on the page component with simple Thanks for help!
4 replies
TTCTheo's Typesafe Cult
•Created by 4b47 on 1/19/2023 in #questions
Login in with credentials with next auth
Hello! I'm trying to learn how to use next auth with credentials. So i got this next auth settings: And i'm using this function to login , signIn is imported from next-auth. And everything seems to be okay, but that authentication is not persisting. I mean, when i login and go to index file and again to login page, I'm again unauthenticated. Whats the problem?
7 replies
TTCTheo's Typesafe Cult
•Created by 4b47 on 1/18/2023 in #questions
Error function trpc
Okay, so im kinda new to trpc stuff and not that familiar with that. I want to throw error on backend when Email is not unique. So when i write it like this in my router it works great, it throws that error:
but wanted to do it in more elegant way, and use util function like this and , but then i just got error i assume from that unique field in db and got 500, not my desired error which i throw in util function. What is wrong? also, dont really know how to type ctx in util function. Thanks
but wanted to do it in more elegant way, and use util function like this and , but then i just got error i assume from that unique field in db and got 500, not my desired error which i throw in util function. What is wrong? also, dont really know how to type ctx in util function. Thanks
2 replies
TTCTheo's Typesafe Cult
•Created by 4b47 on 1/13/2023 in #questions
Help with new trpc syntax
Hello! Can anyone help me rewrite this example piece of code to new trpc syntax with Public procedures, so I will know how to do it? Thanks!:)
2 replies