John
John
Explore posts from servers
TTCTheo's Typesafe Cult
Created by John on 4/10/2023 in #questions
Vim "virtual text?!?" fix
The issue is that when there's an error in nvim, the error message is going through the screen and its imposible to read it
10 replies
TTCTheo's Typesafe Cult
Created by John on 3/5/2023 in #questions
Should i use prisma if i know that my service WILL get ddos-ed?
So i got the assignment and the part of it an auth service. Teacher made sure that they will load-test it so i need to make it the most stable. Should i use prisma? it feels like prisma's data flow will 💩 all over the place. im specifically looking at @Brendonovich's prisma-client-rust
12 replies
TTCTheo's Typesafe Cult
Created by John on 11/22/2022 in #questions
DES algorithm
Anyone knows how to write DES in Node? I have an assignment and my brain is melting. If anyone has a gist, it will save my miserable life. 🙏
8 replies
TTCTheo's Typesafe Cult
Created by John on 10/14/2022 in #questions
How do i parse Fetch response with superjson
So the issue is that when i fetch data it wraps data into object with key "json" and value of data:
const groupResponse = await fetch(`${baseUrl}/groups`);

//Handle errors
if (!groupResponse.ok) {
throw new TRPCError({
message: "Failed to fetch groups",
code: "BAD_REQUEST",
});
}
const json = await groupResponse.json();
console.log(json);
const groupResponse = await fetch(`${baseUrl}/groups`);

//Handle errors
if (!groupResponse.ok) {
throw new TRPCError({
message: "Failed to fetch groups",
code: "BAD_REQUEST",
});
}
const json = await groupResponse.json();
console.log(json);
And the json variable has a form of
{
json: {some data}
}
{
json: {some data}
}
I could do something weird like:
const json = await groupResonse.json().json
//or
const json = superjson.parse(await groupResponse.json())
const json = await groupResonse.json().json
//or
const json = superjson.parse(await groupResponse.json())
but id love to run into some less cringe solution.
1 replies
TTCTheo's Typesafe Cult
Created by John on 10/6/2022 in #questions
Is Capacitor + T3-Stack possible?
Hey, so im building the scheduler app for personal usage and I'd love to use Capacitor to run it on mobile (coz i kinda don't want to use ReactNative). SOOO, is it possible to build "Next" app into what Capacitor is building apps (I feel like serverside-ness of Next is what will make my life a nightmare at this project)? What are your suggestions for building this project if not with Capacitor? Thanks ❤️
6 replies