Bozic0909
Bozic0909
Explore posts from servers
TTCTheo's Typesafe Cult
Created by Bozic0909 on 9/18/2023 in #questions
env variable is undefined
as far as I know its not, you can ask question about anything related to typescript web next react etc
6 replies
TTCTheo's Typesafe Cult
Created by Bozic0909 on 9/18/2023 in #questions
env variable is undefined
I'm not using T3
6 replies
TTCTheo's Typesafe Cult
Created by Bhan Singh on 9/23/2023 in #questions
Drizzle and Create-t3
I had same issue, for me it was not the problem with env variables values itself, but it was problem with loading variables, and i solved problem by using dotenv library like this on the top of drizzle.config.ts
dotenv.config({
path: ".env",
})
dotenv.config({
path: ".env",
})
21 replies
DTDrizzle Team
Created by Bozic0909 on 9/17/2023 in #help
connection ECONNREFUSED when trying to push to neon db
I figured later, the issue was with env variables not being loaded properly even though they exist i managed to fix this issue by using dotenv library
3 replies
TTCTheo's Typesafe Cult
Created by Bozic0909 on 9/18/2023 in #questions
env variable is undefined
I solved it by using
import * as dotenv from 'dotenv';

dotenv.config({
path: '.env.local',
});
import * as dotenv from 'dotenv';

dotenv.config({
path: '.env.local',
});
at the top of the file
6 replies
DTDrizzle Team
Created by Bozic0909 on 8/28/2023 in #help
drizzle studio tables are empty
I manage to solve this by adding fileMustExist: true, in the
const sqlite = new Database("sqlite.db", {
fileMustExist: true,
});
const sqlite = new Database("sqlite.db", {
fileMustExist: true,
});
4 replies
TTCTheo's Typesafe Cult
Created by parameter666 on 8/28/2023 in #questions
SSR and page transitions
Maybe something like this https://github.com/swup/swup I didnt try it just saw it few days ago, soo not sure if it will work
12 replies
TTCTheo's Typesafe Cult
Created by Bozic0909 on 3/7/2023 in #questions
session does not exist in SSR using with createProxySSGHelpers
thanks
12 replies
TTCTheo's Typesafe Cult
Created by Bozic0909 on 3/7/2023 in #questions
session does not exist in SSR using with createProxySSGHelpers
one more question, is it normal to still se a loading for a half of second when prefetching data for query?
12 replies
TTCTheo's Typesafe Cult
Created by Bozic0909 on 3/7/2023 in #questions
session does not exist in SSR using with createProxySSGHelpers
ouhhh thank you, that worked
12 replies
TTCTheo's Typesafe Cult
Created by Bozic0909 on 3/7/2023 in #questions
session does not exist in SSR using with createProxySSGHelpers
getAllUserDecks takes userID from session, and session should exist in createContextInner?
12 replies
TTCTheo's Typesafe Cult
Created by Bozic0909 on 3/7/2023 in #questions
session does not exist in SSR using with createProxySSGHelpers
yes and its looks like this
getAllUserDecks: protectedProcedure.query(({ ctx }) => {
return ctx.prisma.deck.findMany({
where: {
userId: ctx.session.user.id,
},
});
}),
getAllUserDecks: protectedProcedure.query(({ ctx }) => {
return ctx.prisma.deck.findMany({
where: {
userId: ctx.session.user.id,
},
});
}),
12 replies
TTCTheo's Typesafe Cult
Created by Bozic0909 on 2/23/2023 in #questions
Where to check if user is owner
thank you people!
26 replies
TTCTheo's Typesafe Cult
Created by Bozic0909 on 2/23/2023 in #questions
Where to check if user is owner
ouhh didn't know that, will try that in morning
26 replies
TTCTheo's Typesafe Cult
Created by Bozic0909 on 2/23/2023 in #questions
Where to check if user is owner
input can be passed to middleware, or custom prop?
26 replies
TTCTheo's Typesafe Cult
Created by Bozic0909 on 2/23/2023 in #questions
Where to check if user is owner
well I have 2 routers and each has 3-4 methods, soo I guess calling function is fine in this situation, but I wonder what would be example if there is an app a lot larger?
26 replies
TTCTheo's Typesafe Cult
Created by Bozic0909 on 2/23/2023 in #questions
Where to check if user is owner
also thank you for video I will take a look!
26 replies
TTCTheo's Typesafe Cult
Created by Bozic0909 on 2/23/2023 in #questions
Where to check if user is owner
@thanks you @cje should I call that inside every route method?? and for example in prisma query, I can do that for deck but not in card router for cards
26 replies
TTCTheo's Typesafe Cult
Created by Bozic0909 on 2/23/2023 in #questions
Where to check if user is owner
yes
26 replies
TTCTheo's Typesafe Cult
Created by Bozic0909 on 1/21/2023 in #questions
cant access user id in router ctx
I solved it by importing router to root router
7 replies