Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service worker documentation and example #291

Open
mfulton26 opened this issue Apr 5, 2024 · 2 comments
Open

Service worker documentation and example #291

mfulton26 opened this issue Apr 5, 2024 · 2 comments

Comments

@mfulton26
Copy link

From what I can tell, Hono can be used for an offline web app in a service worker (even hosted from a web server that only serves static assets).

Can that get officially documented and demonstrated through an example?

I found this, which is magical indeed, but I think a simpler example that doesn't use the same service worker between Cloudflare and browser but a simple browser example would be sufficient and beneficial (your magical example could be linked to it included too).

I think officially documenting on the site and linking to a Hono example in the example repo with other examples would help demonstrate that Hono really can be ran in most any JS runtime and that it can be used to power an offline only web app (installed while online but then requires no Internet connection for usage).

@yusukebe
Copy link
Member

yusukebe commented Apr 6, 2024

Hi @mfulton26

Great idea! I know some users use Hono inside a service worker in production. So it's not only for magic. I'd like to have it.

@mfulton26
Copy link
Author

mfulton26 commented Apr 6, 2024

I'm starting to look at HonoX too. I'd love to bundle Next.js / Remix / Deno Fresh like app routing into a service worker. If Honox targets multiple different JS runtimes like Hono (which I'm guessing it will as it appears to be built on top of Hono) then large, multi-route apps can be served from the edge and from service workers with high code reuse. Sounds amazing to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants