Hono

H

Hono

This is the official Hono discord server for the community

Join

Service Worker with react-router / tanstack router

Hi all, playing around with the service worker implementation and was wondering if anyone was able to get it to work with a client side router. I am running into an issue where the client side routing is taking priority over the hono service worker router.

Can I automatically serve endpoints from a folder?

Hey, I use Hono and Bun and wondering if I can automatically create routing for my endpoint instead of listing them one by one?
No description

Cookie not set 'hono/vercel', zod-openapi...

Hi, i have no idea why this route don't wok as i want it doesn't set Cookie ```javascript const GoogleRouteHandler: AppRouteHandler<typeof GoogleRoute> = async (c) => { const controller = new AuthenticationController(); const { state, code, url } = await controller.createGoogleAuthorizationURL();...

I want to return component to API response which contsin useState.

I have tried to return component but useState won't work, only messages like Hello World works
No description

How to fully set up oauth provider in hono?

I have a Next.js project here for my frontend, and my backend uses Hono, Drizzle ORM, and Neon database. I've already finished setting up my session database authentication. Now, I want to set up Google login using the third-party middleware provided in the Hono documentation for the OAuth provider. Here's my setup: after logging in with Google, I want it to create a user in my Neon database so that I can also handle the user's session in the database. The problem I'm facing is that OAuth has its own session, which is the 'state'—it seems like an access token that lasts for 1 hour. I'm not sure how to apply it to my session database management. Here's my flow for login and create a session of the authentication: ```ts...
No description

Hono Graceful Shutdown: Bun

Hono example with bun doesn't allow the use of Bun.serve, which would expose a method to stop or close. HonoJS app instance doesn't expose any method to close or stop all incoming connections to wait the resolve of all request before shutting down. In production apps graceful shutdown would allow for server to restart gracefully....

Any way to use @hono/auth-js without frontend?

Is there any way to use @hono/auth-js to create credentials provider session auth system without a frontend?

how to pass a body in the $put requestes ??

i want to pass a json body to a put request but idk how
No description

The response type cannot be obtained using Hono RPC and TanStack Query

I was trying to get the "return success" and "return error", but what I've got is this "type ResponseType = {}" or "type ResponseType = any"
No description

How to implement proxy connections with hono?

I am trying to connect to a proxy network from my hono server but the standard fetch request doesn't allow any proxy arguments. What should I do instead?

Netlify error

I copied the docs exactly from https://hono.dev/docs/getting-started/netlify to clone the netlify template. As soon as I run netlify dev, I get this error. ```bash kiran@KiranMac my-app % netlify dev ◈ Netlify Dev ◈...

Building HonoJS ts app

Hello guys! How do you usually build a hono nodejs app? I have a plain api that I see it is using tsx to run on dev, but it doesn't have any build step. I saw in the docs there is a suggestion of adding a "build" step with tsc but i was curious how other people handle it ...

Strange error

Hi, I'm trying to create something with HonoJS, CloudFlare Workers and D1 (with Prisma). I just want to temporarily lock the user, only I run into this strange problem....

Adding hono to existing node express project

Does anyone have experience using Hono alongside their Node express server? We're trying to use Express middleware to pass requests to our Hono router I keep getting a 404 not found and can't figure out how to pass the Express request properly to Hono ```js const router = express.Router<$Request, $Response>();...

Type Sharing between Nuxt and Hono

We have a Monorepo with a Nuxt 3 frontend and a Hono backend. Now we are unsure on what's the best approach to type our API calls. Our API request look something like this currently ```typescript...

google auth

what does this even do , what is it supposed to be expecting (Required parameters were not found. Please provide them to proceed. i get this error) await googleAuth({ client_id: c.env.GOOGLE_ID, client_secret: c.env.GOOGLE_SECRET,...

POST @hono/zod-validator seems to fail

I have a fairly minimal use-case, in which I'd like to validate that the json posted to an endpoint is correct ala zod. However, it bombs immediately with the following.
{"success":false,"error":{"issues":[{"code":"invalid_type","expected":"string","received":"undefined","path":["source"],"message":"Required"}],"name":"ZodError"}}
{"success":false,"error":{"issues":[{"code":"invalid_type","expected":"string","received":"undefined","path":["source"],"message":"Required"}],"name":"ZodError"}}
...

is the client component `render` method hydration?

Hey I was wondering if the client components render function was actually hydrating the UI. Thanks for the answer!...

"Error: 'c.header is not a function' in Hono setCookie with tRPC Integration"

I'm encountering an error in my Hono and tRPC setup when attempting to set a cookie after user registration. The error message is:
TypeError: c.header is not a function. (In 'c.header("Set-Cookie", cookie, { append: !0 })', 'c.header' is undefined)
TypeError: c.header is not a function. (In 'c.header("Set-Cookie", cookie, { append: !0 })', 'c.header' is undefined)
```...
Next