Hono

H

Hono

Join the community to ask questions about Hono and get answers from other members.

Join
JKJackson Kasi5/2/2024

Seeking Guidance: Transitioning from Hono.js with Cloudflare Workers to AWS Lambda

Hello, guys! Does anyone have a project that combines Hono.js with AWS Lambda? Please share it here. It would be helpful for me to work with this tech stack. I have worked with Hono.js and Cloudflare Workers, and it's really fast. However, some npm packages do not support edge computing. Therefore, I am planning to switch my upcoming project to AWS. ( hono js + aws lambda ) However, due to the lack of documentation, I am unable to work with Hono.js on AWS Lambda, and there is no option to run the server locally. ...
Uuneatable47805/2/2024

How do I properly serve static files (generated by Astro)?

I'm trying to serve files built by Astro along with their imports. Currently only the html files without imports get served. For example, http://localhost:3000/_astro/headerBg.C9Twm_Bk.png returns 404. Here's my project structure:...
BBlankeos5/1/2024

When there's an error on my typescript code on Hono, Vite Dev Server crashes, and doesn't restart

Problem: - Error? Crash the dev server and not wait for file changes. Ideal experience: - Error? Say it's an error and wait for file changes....
Bblake5/1/2024

How to implement Oauth in Hono?

I am a beginner. I have used next-auth in next js. Is there a way to implement google Oauth in hono? Code and youtube videos are appreciated. Is there any library i can use?
FFranz35/1/2024

Failed to load .env file ".env": Error: ENOENT: no such file or directory

Hey, Im new to using cloudflare and new to using Hono. I now came across an error that tells me Im missing a .env file, which also should contain some variables. The problem is, idk where I use these and what their values should be. It seems like these should be using system variables instead (Im currently on Windows 10), but I could find an answer online. This only started appearing after I added and tried using Hono. Here is my code: ```typescript import { Hono } from "hono";...
Ttony4/30/2024

executionCtx.waitUntil on write service

I have a worker that I want to call an external api on, but I want to return a response without awaiting the the external api call. (the external api call is to just save time writing to the db on another service). ```javascript const promise = fetch('http://localhost:3000/impression', { method: "POST", body: JSON.stringify(data),...
NNorteX4/28/2024

Does Hono JSX do client-side hydration?

I.e. are client events like on:click meant to work? And if not, how can it be enabled / done in other ways?
KDVKillian Di Vincenzo4/28/2024

StreamSSE on http2

Hi ! It seems that the streamSSE feature is not correctly adapted to work on http2. It adds the following header ‘transfer-encoding’->‘chuncked’, which is not authorised on http2. ```js var streamSSE = (c, cb, onError) => { const { readable, writable } = new TransformStream(); const stream = new SSEStreamingApi(writable, readable);...
Z⚡Z.E.U.S⚡4/27/2024

Optional params in hono/client

It seems that it doesn't support optional params at all. In hono I can specify optional parameters, but in hono/client this is not supported. If I have a route with /:idOrSlug?/invite, then it will match /invite and /:idOrSlug/invite. And if I insert the correct value for the hono client then everything will work, but if it is undefined it will just put the undefined value in the url as shown in the screenshot above....
No description
NNiamarou#klm094/25/2024

Send data to Hono

Hi, how can i send Request body and file on same route.
Mmathys4/24/2024

Client ip

How can I get the client ip, I need it for my rate limiter
Iigmtink4/24/2024

What is the best way to handle the error?

What I want is to get the error from server to client using rpc + react query 1. Using trycatch 2. Returning c.json({ message: 'Invalid password' }, 401) 3. Throwing HTTPException(401, { message: 'Invalid password' })...
No description
Kking8fisher4/22/2024

Running `bun run dev` on a newly created Cloudflare Pages example spits an error

``` bun run dev $ vite (!) Could not auto-determine entry point from rollupOptions or html files and there are no explicit optimizeDeps.include patterns. Skipping dependency pre-bundling. error when starting dev server:...
CChicha4/22/2024

connect my hono application endpoints with swagger ui

how i can use swagger ui with my hono application
Iigmtink4/22/2024

How to set "credentials: true" in client side using rpc?

I'm using rpc with react query on the client side, this kind of fetching has already credentials: true?
No description
NN01R4/20/2024

Cookies doesn't process

When I try to run in my middleware the following ``` setCookie(c, 'test', 'res', { maxAge: 60 * 60 * 24 * 7, httpOnly: true }) console.log(getCookie(c, 'test'));...
CChicha4/19/2024

use Context to get vars from wrangler.toml

how can fix this code. i want to use my openaiApiKey from the wrangler.toml when i create an openai instance. but i cannot use the context . how can i fix it ?
No description
FFaris4/19/2024

Connect Hono Cloudflare with MongoDB

Hi. I am using Hono and deploying to Cloudflare. However I am unable to find a way to connect mongodb database using mongoose
KKorny4/17/2024

Case insensitive query params

We are using hono-zod-openapi to replace an existing API. Sadly the old API (written in ASP.Net) appears to have case-insensitive handling of parameters - and we may need to emulate this. Gah. So we have something like ```...
Iigmtink4/17/2024

Password hashing

How to hash password?
Next