Aditya Mathur
Aditya Mathur
HHono
Created by Chris on 12/7/2024 in #help
Lambda Edge
Can you share the link and mark this as solved?
4 replies
HHono
Created by Arthur on 11/27/2024 in #help
formdata get uploaded file
regarding the design? or are you still facing this issue?
16 replies
HHono
Created by lukas on 11/22/2024 in #help
Hono Graceful Shutdown: Bun
You can use bun serve with hono. hono instance has a fetch function which you can pass in bun.serve
2 replies
HHono
Created by haramman on 12/2/2024 in #help
Using TailwindCSS with Hono/JSX
You can either use the tailwindcss CDN file or use something like vite to compile your TailwindCSS. There are some examples in https://github.com/honojs/examples repo
5 replies
HHono
Created by meow on 12/1/2024 in #help
Abstracted routes but with context and types
You can use the same factory to create the app in hello.ts. So first abstract the createFactory logic in a separate file and use it's createApp function to create app for the both the routers
3 replies
HHono
Created by Enyel on 10/21/2024 in #help
Infer client openAPI
Hey there are some know issues with the @hono/zod-openapi, this might be one of those. I have created a middleware which helps with generating the OpenAPI Specs in your normal hono app, you can try that. https://github.com/rhinobase/hono-openapi
2 replies
HHono
Created by marcbejar on 10/19/2024 in #help
Git Autodeploy on Cloudflare
Seems like the issue could be related to how you have connected your GitHub Repo. I would suggest to ask this in the Cloudflare discord as those might be able to help you better regarding this.
3 replies
HHono
Created by mihaaai on 10/16/2024 in #help
Is there a way to get bindings outside the `c` Context of an inbound Request in Cloudflare Workers?
Then I think you should either ask them in their discord or create a discussion/issue on their GitHub regarding this.
10 replies
HHono
Created by mihaaai on 10/16/2024 in #help
Is there a way to get bindings outside the `c` Context of an inbound Request in Cloudflare Workers?
Yeah, this is perfect - https://www.better-auth.com/docs/integrations/hono#mount-the-handler, just init the auth inside the function. honestly regarding the function if you are not running this on node then you are still init the auth on each request. If you are on node then you can just store the auth instance as a global variables once init.
10 replies
HHono
Created by mihaaai on 10/16/2024 in #help
Is there a way to get bindings outside the `c` Context of an inbound Request in Cloudflare Workers?
Like this Hono<{ Variables: { auth: any } }>()
10 replies
HHono
Created by mihaaai on 10/16/2024 in #help
Is there a way to get bindings outside the `c` Context of an inbound Request in Cloudflare Workers?
But you will setting the value inside a middleware, so you will have access to the bindings. Rough Example -
app.use(async (c, next) => {
const auth = betterAuth({
// ...
database: c.env.DB
})

c.set("auth", auth)
})
app.use(async (c, next) => {
const auth = betterAuth({
// ...
database: c.env.DB
})

c.set("auth", auth)
})
. Dont forget to add auth in hono variables
10 replies
HHono
Created by DJ on 10/17/2024 in #help
Is there any way to mock cookies using testing helpers?
Usually the behavior is that we get connect to a test env where their is mock user, which we use to get the cookie.
6 replies
HHono
Created by DJ on 10/17/2024 in #help
Is there any way to mock cookies using testing helpers?
What is Cookie? and how are you adding cookies in your frontend?
6 replies
HHono
Created by mihaaai on 10/16/2024 in #help
Is there a way to get bindings outside the `c` Context of an inbound Request in Cloudflare Workers?
Why don't you store the auth instance in the context by .set() using a middleware? That why you will also get the context object as well as a single instance will be used across your request
10 replies
HHono
Created by avem on 10/14/2024 in #help
Pass context to exception handler
You can pass this data in the Exception as well as set this in context using .set and access it in the onError using .get
4 replies
HHono
Created by -purchasable- on 10/11/2024 in #help
hono type definition not working (using hono first time)
2 replies
HHono
Created by anand248 on 10/9/2024 in #help
honox - not returning anything from POST, gives 404.
I think this also happens in hono
3 replies
HHono
Created by Peтe on 10/9/2024 in #help
JSX not working at all with just "bun add hono"
@Peтe are you using any middleware here?
14 replies
HHono
Created by Peтe on 10/9/2024 in #help
JSX not working at all with just "bun add hono"
Hey @Shy based upon this https://discord.com/channels/1011308539819597844/1012485912409690122/1293495908193013845, it seems this code is working. My guess is either their is some middleware which is effecting this or the bun runtime.
14 replies
HHono
Created by h on 9/3/2024 in #help
Argument type string is not assignable to parameter type keyof E["Variables"]
Can you show the code snippet?
8 replies