DangerZone
Explore posts from serversCDCloudflare Developers
•Created by DangerZone on 11/5/2024 in #workers-help
Connect a worker to AWS VPC via Tunnel
Hello, is it possible to connect a Cloudflare worker to my AWS VPC through a Cloudflare tunnel?
I haven't seen any documentation about this other than the statement that a tunnel connects a private network to cloudflare network which sounds like it could allow workers send requests to an endpoint within my AWS VPC.
Is that possible? and if yes, is there any documentation on how we can enable it?
1 replies
CDCloudflare Developers
•Created by DangerZone on 10/15/2024 in #workers-help
Does a worker has access to bulk KV writes?
I want to create a worker that serves as a proxy to KV, specifically for the bulk writes.
Can I use the bulk operations within the KV bindings?
10 replies
CDCloudflare Developers
•Created by DangerZone on 10/14/2024 in #workers-help
Accessing Remote R2 while having local assets
Hey,
I am trying to build a worker that can access my remote R2 buckets, but still have local static assets to serve.
From my research it looks like its common to have an R2 assets bucket to solve this issue, but because multiple develpers are going to work on this worker, we don't want them to share the same assets bucket.
Our current limitations:
- We can't seed the local R2 since our data set is too big, and we need to know which data is seeded specifically across tens of buckets.
- We can't have a remote assets folder since we don't want engineers to share them.
- We can't have local assets with
wrangler dev --remote
since it throws an error:
Whats should we do?7 replies
CDCloudflare Developers
•Created by DangerZone on 10/14/2024 in #workers-help
Cannot use assets in remote mode
Hello,
I want to use an assets folder within my worker, on
wrangler dev
everything serves as expected, but when I am adding the --remote flag to the command I am getting this error:
I am trying to run the local worker with access remote R2 buckets, is there a way to do that with my assets folder?
My Toml assets configuration:
3 replies
Property 'error' does not exist on type 'MiddlewareOKResult<any>'.
Hello,
I am building an trpc adapter for nestjs, and I am trying to extend some of trpc's functionality, specifically the procedure middleware by creating a procedure class.
I am using the
MiddlewareFunction
here so it will provide the correct opts
implementation.
Everything works perfectly, but when I am trying to run it, I am getting a typescript error:
Anyone has an idea of how to solve this? I thought about using the ProcedureBuilder
interface but couldn't make it to work.1 replies
TTCTheo's Typesafe Cult
•Created by DangerZone on 6/27/2024 in #questions
Creaete T3 No Req or Res in TRPC context
I am trying to integrate clerk with the trpc create context, but the createContext generated by create-3t isn't passing the req or res of the request.
What can I do?
8 replies
Validating inputs and outputs only via typescript
Hey everyone,
I am trying to create an appRouter with
ts-morph
but I am having trouble with passing the zod
schema/object instance to it (since I need to pass the original implementation, not the instance).
I was thinking about a way to work around this and was wondering if I could somehow just pass the zod typescript type in the inputs and outputs - keep in mind that my usecase only calls for the type definitions to work, not the actual implementation.
here you can see I am trying to pass on;y the RandomType
, but ofc I don't really know what I am doing 😄2 replies
How can I generate trpc Generic Types?
I am building a trpc library, and as part of my implementation, I need the generic types of
t
, t.mergeRouters
, t.procedure
, t.router
and t.middleware
.
I've haven't been able to locate those generic types in the @trpc/server
and since trpc has such a complex type structure, would love to see an implementation for a generic set of types for the ones listed about.4 replies