wlvz
wlvz
Explore posts from servers
TTCTheo's Typesafe Cult
Created by wlvz on 7/15/2023 in #questions
View but not download with S3
or would that not wrok?
9 replies
TTCTheo's Typesafe Cult
Created by wlvz on 7/15/2023 in #questions
View but not download with S3
what if i encrypt the file in s3 and then decrypt it on the client side, since the original file is still encrypted it'll download an encrypted version they cant open which is just as good
9 replies
TTCTheo's Typesafe Cult
Created by wlvz on 6/28/2023 in #questions
Cold starts on Edge?
when testing on this site (https://www.awsspeedtest.com/latency) i can see that my latency to us-east-1 (the region of my db) is around ~250 - 300ms (the same as how long it takes for a request on my site from my location) and if i switch my db location to somewhere closer to me i can get that down to around ~80ms
17 replies
TTCTheo's Typesafe Cult
Created by wlvz on 6/29/2023 in #questions
TypeError: Cannot read properties of undefined (reading 'subscribe')
i managed to fix it, the issue was with the way i was mapping the data, i just got rid of that and rewrote it from scratch and changed it a little and then it worked
5 replies
TTCTheo's Typesafe Cult
Created by wlvz on 6/28/2023 in #questions
Cold starts on Edge?
although my DB and edge function locations are both in us-east even though i’m nowhere near that geographically so i want to change both my db location and my function location to somewhere closer to me and test it again then
17 replies
TTCTheo's Typesafe Cult
Created by wlvz on 6/28/2023 in #questions
Cold starts on Edge?
changing the edge functions server to the same as my db also helped reduce the response time which was really nice
17 replies
TTCTheo's Typesafe Cult
Created by wlvz on 6/28/2023 in #questions
Cold starts on Edge?
now even when the server is completely cold i still get around a ~200-250ms response time
17 replies
TTCTheo's Typesafe Cult
Created by wlvz on 6/28/2023 in #questions
Cold starts on Edge?
deploying and testing it on there as opposed to a local dev server got rid of those massive cold starts
17 replies
TTCTheo's Typesafe Cult
Created by wlvz on 6/28/2023 in #questions
Cold starts on Edge?
alright tysm
17 replies
TTCTheo's Typesafe Cult
Created by wlvz on 6/28/2023 in #questions
Cold starts on Edge?
ah okay, but shouldn't they be a lot less than ~700ms compared to ~250ms? I think if I were to deploy this project to vercel then the 'cold start' time would be reduced as the dev server often recompiles on changes and runs everything under Node.
17 replies
TTCTheo's Typesafe Cult
Created by wlvz on 6/28/2023 in #questions
Cold starts on Edge?
I'm pretty sure the issue comes from the fact it's a local dev server, although I could be wrong
17 replies
DTDrizzle Team
Created by wlvz on 6/27/2023 in #help
Invalid input Only "mysql2" is available options for "--driver"
I tried running drizzle-kit introspect:mysql2 and I get the error:
error: unknown command 'introspect:mysql2'
(Did you mean introspect:mysql?)
error: unknown command 'introspect:mysql2'
(Did you mean introspect:mysql?)
4 replies
DTDrizzle Team
Created by wlvz on 6/25/2023 in #help
net::ERR_NAME_NOT_RESOLVED
when i go on safari the error updates to: [Error] Fetch API cannot load https://undefined/psdb.v1alpha1.Database/Execute due to access control checks. [Error] Failed to load resource: A server with the specified hostname could not be found. (Execute, line 0)
3 replies
DTDrizzle Team
Created by wlvz on 6/25/2023 in #help
net::ERR_NAME_NOT_RESOLVED
?
3 replies
TTCTheo's Typesafe Cult
Created by Complexlity on 6/24/2023 in #questions
How to get rid of CORS errors
you can change your middleware so that if you hit the api endpoint it will append the headers
export async function middleware(request: NextRequest) {
const response = NextResponse.next()

if (request.nextUrl.pathname.startsWith("/api")) {
response.headers.append("Access-Control-Allow-Origin", "*")
}
//...
return response
}
export async function middleware(request: NextRequest) {
const response = NextResponse.next()

if (request.nextUrl.pathname.startsWith("/api")) {
response.headers.append("Access-Control-Allow-Origin", "*")
}
//...
return response
}
10 replies
TTCTheo's Typesafe Cult
Created by wlvz on 6/22/2023 in #questions
Prisma Data Proxy vs Drizzle
Just to add, I'm aware Drizzle is a lot better performance wise however Prisma is a lot easier to work with IMO and I love Prisma Studio and I'd rather not give it up.
8 replies
TTCTheo's Typesafe Cult
Created by wlvz on 6/21/2023 in #questions
CORS Issue on only some API calls
this worked 🙏, tysm
15 replies
TTCTheo's Typesafe Cult
Created by wlvz on 6/21/2023 in #questions
CORS Issue on only some API calls
yeah, still didn't work
15 replies
TTCTheo's Typesafe Cult
Created by wlvz on 6/21/2023 in #questions
CORS Issue on only some API calls
didn't work sadly, what confuses me is that the api call withou any CORS configuration works but the second one doesn't work
15 replies