Hono

H

Hono

This is the official Hono discord server for the community

Join

Hono not inferring output correctly with RPC

Im having an issue related to the output of hono RPC. I have this route to check if an organization exists by slug. ```...

RPC + React Query Mutations

Hi all, When I create a react-query mutation using the hono client, if i return the json in a 200 response, the onSuccess does not populate with the right typings, it only shows overlapping keys from other response codes like 400 ` ...

Compression on cloudfront + lambda@edge

I'm having issues getting gzip compression to work for my hono endpoints. I've tried the compress middleware and als otweaking some Cloudfront caching settings, but couldn't make it happen. My lambda@edge receives viewer-request events from cloudfront. Just checking if anyone managed to make that combo work. Thanks!

Hono Param Parsing - bug?

I have this route: "/e/:type/:batch/:hash.:dest" Hono routes this properly, however, it does NOT split the params properly ```json {...

I want to use hono on lambda@edge but I'm not ready to adopt cdk

Are there any alternatives to deploy my typescript handler to lambda@edge?

Generic Types Not Working as Expected

I'm facing an issue with generic types in a PaginatedResponse setup. Here's my use case: Code Example: ```typescript...

Lambda Edge

I'm trying to follow thse instructions but I don't think it's working, no cloudfront distribution... https://hono.dev/docs/getting-started/lambda-edge...

Issue with ConnInfo

I'm trying to use const info = getConnInfo(c) To get the ip adress of the user for ratelimiting, but when I do console.log(info) I get this wrong ip: { remote: { address: '::ffff:172.18.0.1', port: 56124, addressType: 'IPv6' } }...

Default headers not setting in nextjs rpc requests

When using the rpc client in nextjs, it doesn't include the headers for the request like a normal fetch does, this ends up leaving out items like cookies which is needed for authentication on the server. ```ts import type { AppType } from "@buzztrip/api/src"; import { env } from "env";...

Argument of type 'Element' is not assignable to parameter of type 'Container'

Using https://github.com/honojs/examples/tree/main/hono-vite-jsx, stripped back for a minimal repro... The following code gives me a TypeScript error, "Argument of type 'Element' is not assignable to parameter of type 'Container'". Any ideas as to how best to resolve the error?...

Cookie not being set/created?

Hi, I am following a youtube tutorial https://www.youtube.com/watch?v=Av9C7xlV0fA and when I login there is no cookie value being generated.I checked my code multiple times and I see no difference. here is the code in raw format https://raw.githubusercontent.com/AslanHalil/jira-clone/refs/heads/main/jira-clone/src/features/auth/server/route.ts thanks....

Hono's Client does not work in Nuxt SSR

I have attached the the image using the native $fetch API of Nuxt to make a call to /api/profile and this works perfectly. However, I want the type-safety of RPC and so instead, I use the client. In the second image, there is now an issue. When the frontend is rendering the HTML in the server, the request is blocked and I have no idea why. There are two log statements and this is the output in the terminal, i.e. the server. In the server, the client does not make the request when it should. But it works perfectly fine in the browser. Can someone please help me??...
No description

Context is not available, context storage middleware

``` const app = new Hono<Binds>() app.use(contextStorage()); ...

Using TailwindCSS with Hono/JSX

Hello, When using only Hono, I serve html (hono-jsx) on a single endpoint, but I would like to style this with TailwindCSS. Is there a straight-forward way to accomplish this? My app is hosted via Convex (if that makes a difference)....

Abstracted routes but with context and types

I know there's some discussion of abstracted routes under https://hono.dev/docs/guides/best-practices. But there's no example which preserves the types from the context or middleware. ```ts import hello from "./hello.ts" ...

How to respond with multipart/form-data, containing image and json?

Hi, i'm trying to respond with multipart/form-data format but cant find any working example of how i should do this. https://hono.dev/docs/api/context#body How can i make working response with, for example, one png file const imageBuffer = await imageFile.arrayBuffer(); and some other field i.e. "{"json":"somejson"}"? I've tried some approaches but they didn't work and insomnia returned errors in attempts to read response. ...

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
Next