Hono

H

Hono

This is the official Hono discord server for the community

Join

SSR and Client components using Cloudflare pages

Hello, I have been trying to get server-side rendering and client components to work for some time now, but I can't seem to make it function properly. I used the template from bun create hono and selected Cloudflare Pages. While the page gets rendered, it doesn't get hydrated on the client. I have looked into the hono/jsx-dom documentation (https://hono.dev/docs/guides/jsx-dom) and this example (https://github.com/honojs/examples/tree/main/hono-vite-jsx), but I have been unable to use them with a server-side rendered application. Any help would be greatly appreciated!...

Cannot parse action at /api/auth/providers also /api/auth/error (Next Auth .vs Cognito AWS)

Hi, I'm trying to integrate Hono.js with my Next.js App using Auth.js and Cognito AWS. I've follow the example repo here: https://github.com/divyam234/next-auth-hono-react, but it seem to not working as expected. This is my implemented code: // ./api.ts import { Hono } from "hono"; import { authHandler, initAuthConfig, verifyAuth } from "@hono/auth-js";...

Need to generate new css with hash to burst cache

My _renderer.tsx look as below, I wan to generate new .css each time since my css changes are not being reflected on browser - How to do that ( I am using vite)? ``` <html lang="en"> <head> <meta charset="utf-8" />...

hono type definition not working (using hono first time)

Hey, i am new to hono and using it for the first time. Could you pls help in the issue i am facing. I have passed prisma as a variable in hono generic. However when i use prisma in another function, i am not getting its type definition by default??
No description

JSX not working at all with just "bun add hono"

``js const Layout = (props) => html <html> <head> <meta charset="UTF-8">...
No description

honox - not returning anything from POST, gives 404.

Is this expected, if not will log an issue on honox repo.

RPC AppType breaks if route is defined on a separate file

Hello everyone, Im trying to build a Hono backend with a Vite SPA as the frontend Currently the file structure looks like the image attached I (think) Im able to export the correct type from src/app (image) If I try to create the RPC client on the backend (for testing), it works as expected (image)...
No description

Is the request body parsed using a specific encoding?

I got a request holding a some characters small example: Itali\u00eb This was converted as Italië. Is there a way to disable this?...

Using honox, bun, vite and using islands folder, Hot Reload doesn't work

for client side components changes, they do not get reloaded on browser, Am I missing some setting to enable that?

Nested form objects POST

My form has nested objects and array of objects. I name them as below - ``` <form method="post"> <div class="form-control mb-4">...

how check the param is present. const my_id = c.req.param('id')

Is there preferable way to check const my_id = c.req.param('id') is present in parameters of request?...

Bun Monorepo Hono RPC

I'm trying to setup hono rpc, but I'm not able to get the types or autocompletion for it. I did check to make sure the compiler options are set to strict: true but doesn't seem to work. If you don't mind checking https://github.com/nikevsoft/bun-monorepo what I'm doing wrong?...

CORS Issue

Im using hono x bun for my backend and next js for my front end. when i fetch the api it will return "has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource." i already set my cors settings, here i attached...
No description

Openapi query params

I'm experimenting with openapi docs. I have: ``` const paramsSchema = z.object({ entry_id: z.string().openapi({ param: {...

Using both `c.body` and `c.json` in an endpoint results in `response.json()` of `Promise<unknown>`

hi everyone, is there any way to get the response type working when i have endpoints that return multiple type of content based on status code? this is an example where it fails to infer the type ```ts export const routes = new Hono()...

Deno .env...?

Hello, I wonder if anyone could help me. I 'm having some trouble getting values from my .env file in my Deno project. Works fine with a Bun version but is there some special trick with Deno? I've granted permissions in the terminal and I'm using the Hono adapter env helper. (I'm new to Deno). Thank you for any advice you may have. #deno

Adding swagger to hono API

I want to add a swagger doc to my API and when I add middleware to any new OpenAPIHono instance the .openapi method disappears. ```ts /** * Creates a base instance of Hono with middleware....

Hono RPC

Hello 👋 techies! It's Alfred. I'm currently working on building a backend service with Bun and Hono. I'm facing some challenges with the Hono RPC. Can anyone help me out?