Hono

H

Hono

This is the official Hono discord server for the community

Join

Hono RPC issue with .use

When I use Hono Rpc it only works if I remove .use
No description

How to make Hono Cloudflare server run on network public ip so that other devices can also access it

Usually, Hono works on localhost, which is good. But I am testing my app on mobile but localhost does not work on mobile. it works on network IP addresses like 192.168.1.68. How can I enable it for this IP address?...

Question on vite build with node server

Hey, I'm new to using hono and I was trying to make a production build with vite using the vite-build plugin but whenever I run it none of the env variables will load. For dev I was injecting them with the dotenv-cli within the package.json scripts, but no matter what I do I cannot get them to work after making a vite build. after the build i'm using the node "./dist/index.js" command but when logging the process.env variable there is nothing in there when compared to dev. I'm going to test out trying to deploy this today with wrangler/cloudflare but I was just experimenting and trying to get the build to run locally for testing but nothing was working....

maxAge parameter in Hono Cookie Helper takes seconds?

I have a problem, I have a problem that seems to be solved, but to make sure I wanna ask if maxAge parameter in Hono Cookie Helper expects seconds and not milliseconds as in express cookie-parser?

Can't integrate hono with tus server

Anyone here used Tus: @tus/server I'm having difficulty using hono with it. Here are the different examples of using it with other providers: https://github.com/tus/tus-node-server/tree/main/packages/server#example-integrate-tus-into-express here is what I tried:...

Error cannot file module "@hono/bun" (TS2307)

I'm trying to statically serve some files, in the docs it says to use serveStatic from @hono/bun, but I receive the error modules and its types not found. I've tried multiple solutions but none work: - Tried installing the packaged to ensure @hono/bun was installed using bun add @hono/bun (but it doesnt even exist)...

Best way to export types for use in a separate app with `hc` client

I have a monorepo where one folder contains the Hono app, and another a SvelteKit one. How best do I make the type available to the SvelteKit project for use with the hc client?

Confused by recommendation to compile Hono App and Client

My question is specifically regarding this section of the documentation https://hono.dev/docs/guides/rpc#compile-your-code-before-using-it-recommended I want to compile the types for my Hono client to take some of the workload off TSServer and utilise TSC, and because the VSCode extension for SvelteKit is incorrectly typing the responses returned from the client. I have set up a Deno task and a tsconfig to run tsc on this code: ```ts...

Type safety in middleware?

Hi, it's there a way to get the types right here? ```typescript import { Hono } from "hono" import { hc } from "hono/client" ...

OpenTelemetry?

Hi, does anyone know how to easily implement OpenTelemetry with Hono? Without creating spans manually

What's the recommended way of doing auth?

I'm doing a simple app, just to save my local snippets for now, but it will become a product, so I'll need authentication. The hono server rn is sending html (not an api). There doesn't seem to be a good/simple solution for that in the docs, so what library is recommended for doing auth?...

What can Hono’s web socket helper do that Deno.upgradeWebSocket can’t?

Can someone explain the purpose of using the Hono WebSocket adapter? I'm working with Deno, and since Hono is an HTTP server and Deno has Deno.upgradeWebSocket, it seems like there's not much need for Hono's adapter. WebSocket messages don't go over HTTP, so there's no routing involved anyway. Am I missing something? 🤔

Trouble with Hono and Typescript

I have a fully working server, built with Hono. I am now, implementing typescript in my codebase. This is my main file (paraphrased) ```typescript app.get('/me', userMiddleware, usersMe);...

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?