ZiiM
TTCTheo's Typesafe Cult
•Created by ZiiM on 5/29/2024 in #questions
Error in Nvim with TS related LSPs.
3 replies
TTCTheo's Typesafe Cult
•Created by ZiiM on 10/10/2023 in #questions
Proper way to handle api routes with Go
Hey, I'm just wondering what the correct way to handle API routes with Go is. Currently, I have a route, for example, /post, and then I am switching over the request method to handle it.
So, if you send a GET request to /post, it retrieves all the posts. If you send a POST request to /post, it creates a new post. Is this the correct way, or is having a separate route for each method a better approach?
3 replies
TTCTheo's Typesafe Cult
•Created by ZiiM on 5/6/2023 in #questions
"SyntaxError: Cannot use import statement outside a module" when attempting to build a turborepo app
I have a turbo repo that has a websocket app. I have a package for my redis client so it can be used in all my apps. However when I try to start my websocket app in production I get
I am believe its not transpiling the internal pacakges correctly but unsure how to solve.
Linked the repo below.
https://github.com/ZiiMs/Radiance
Thanks for the help.
5 replies
TTCTheo's Typesafe Cult
•Created by ZiiM on 12/21/2022 in #questions
Stop Pnpm moving packages installed by different package manager to .ignored
So basically any time I run pnpm add or install commands. It will move packages installed by another package manager to .ignored, I want it to stop moving them.
4 replies
TTCTheo's Typesafe Cult
•Created by ZiiM on 11/30/2022 in #questions
NextJS body exceed limit when content sent in body is under limit.
I am sending a photo through TRPC that is then being uploaded to a server. Everything is working except sometimes it exceeds the body limit of nextjs api calls even tho I know the image is less than the limit.
Errors:
POST http://localhost:3000/api/trpc/images.create?batch=1 413 (Body exceeded 8mb limit)
which obviously errors TRPC.
5 replies
TTCTheo's Typesafe Cult
•Created by ZiiM on 10/24/2022 in #questions
Best way to handle who is online.
I have a basic T3 app that is a chat app It has the ability to create separate rooms. I am using web sockets and handle messages, etc. and I can track when someone connects, I just am unsure of how I should handle how the person connects. My current ideas are:
1. Just take the id and store it into a object on the server then just fetch it through trpc. The problem I can see with that is the object could become quite large if you have a large number of users.
2. Store who is online at the time in a DB, it would make it so I can easily query through the data without worrying about handling large objects. Only problem is it would be tons of query's to the DB.
3 replies
TTCTheo's Typesafe Cult
•Created by ZiiM on 10/17/2022 in #questions
Any good librarys for parallaxs
Looking for a good library to make parallax's easy.
3 replies