crystal icon indicating copy to clipboard operation
crystal copied to clipboard

Hono adaptor

Open benjie opened this issue 1 year ago • 6 comments

https://github.com/litewarp/graphile-tools/blob/main/packages/hono-adapter/src/adapter.ts

benjie avatar Jul 26 '24 19:07 benjie

Hey! Saw you made this, so I'll ask questions here to keep things organized.

Question 1 - how important are the http major and minor versions? The Hono context object doesn't provide them like aws. I could wrap the server to extract it from the raw request but wasn't sure if it was worth the effort.

litewarp avatar Jul 29 '24 00:07 litewarp

I don't think they're currently used for anything; but they could be in future - there are certain things that are different between HTTP/1.1 vs HTTP/2+, for example chunked transfer encoding is not supported in HTTP/2+.

benjie avatar Aug 06 '24 11:08 benjie

I've used Koa for idk, 10 years? Would love to migrate to Hono. 👍

danzho avatar Aug 31 '24 23:08 danzho

I've used Koa for idk, 10 years? Would love to migrate to Hono. 👍

As someone who recently switched from Express to Hono Bun I highly recommend it. It just feels like a leaner and streamlined version of Express. It has definitely sped up development for me.

rfdrake27 avatar Sep 17 '24 14:09 rfdrake27

Just an update. Bun should work fine with the original adapter I made above, but there is no http2 or grpc support until bun adopts that natively. It looks like there's work being done, so I'll revisit once it's complete -- https://github.com/oven-sh/bun/pull/14286

litewarp avatar Oct 08 '24 21:10 litewarp

It was easy to write an adapter to use hono as the underlying http server, but adding websocket support for node is tricky since it involves the collab of multiple moving parts as seen in your bun adapter.

Every week I spend an hour trying to get it to work. 😅 If I can manage to migrate off Express, I'd shave 68 transitive deps from my server. :)

  • https://npmgraph.js.org/?q=express
  • https://npmgraph.js.org/?q=hono

danzho avatar Mar 06 '25 21:03 danzho