-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Update Outdated Hono Docs for Pages #15786
Conversation
Hi @NicoPlyley thanks so much for the PR 🙂 🙏 We've discussed it internally and we agree that we ideally want to recommend the use of the use of the create cloudflare CLI (C3). Your PR is instead suggesting the direct use to the create hono CLI which is not really the direction we want to take 😢 We've discussed this and instead of updating the hono guide in the way suggested in the PR we'd want to:
would you like to help in the above and update this PR? If so I would love to help if you want/need 🙂 otherwise you can leave this with us and we'll take care of it, whatever you prefer 🙂 (in any case, thank you so very much again for the PR! it's truly appreciated! sorry for the pushback 🥲) |
I completely understand, I was following the recommendation of @yusukebe which you can see our discussion of using C3 vs create Hono in the issue I linked above. Either way I'd be happy to help, it sounds like your recommend adding another template to C3 for using Hono on Pages, is that correct? And then update this existing PR accordingly? Please let me know if I'm understanding this right and I will submit a PR accordingly! |
Hi @NicoPlyley Thank you for the PR! As @dario-piotrowicz said, we've discussed it internally and have some plans to improve the C3. So, sorry for changing what I said the first time in the discussion. @dario-piotrowicz may be able to show the details later, I think this is good except for the |
Hey @NicoPlyley thanks a lot for your understanding, sorry I did check the issue you shared, I am sorry about all the back and forth regarding this! 🙇 I really appreciate your patience and willingness to update things ❤️ 🙏
What we want to end up with in C3 is something like the following:
So this means that we need to:
hopefully my message clarify things, we don't want to add anther hono on pages template, but update the current hono on pages one and add a hono on workers one 🙂 Thanks so very much again! if there's anything I can help with of clarify I'm always here to help 😄 |
So, I've looked into this a bit more, and to my understanding, @dario-piotrowicz, snippets cannot be added to the file because the The only thing the snippets add is the Bindings, which are auto-generated. So, I suggest just adding this to the Hono template directly or not adding the snippets at all. Let me know your thoughts, @yusukebe. |
Hi @NicoPlyley ! Ideally, for Hono's Pages template, C3 would also update @dario-piotrowicz (and @jculvey ?) If we add Hono's Pages template to C3, the current C3 implementation doesn't seem to be able to update |
@yusukebe I want to clarify we can still update/add the type Bindings = {
[key in keyof CloudflareBindings]: CloudflareBindings[key]
}
const app = new Hono<{ Bindings: Bindings }>() Is not possible since This is currently what is being added, which is set up for using Workers. |
@NicoPlyley Sorry for the late reply! 🙇 Do you need to use You could also have different variants (for example Would this not work for Hono? |
Also since we discussed this issue the C3 UI has actually been updated: So I am guessing that now we would want the Pages hono app to be under |
👋Hi there, we’re going to close this PR. All PRs prior to August 12 need to be reworked due to the platform migration to Astro. |
Summary
I updated the documentation for using Hono on Cloudflare Pages. The current documentation is outdated since Hono (for CF Pages) now uses Vite. C3 is also made for Hono on CF Workers and requires a lot of manual setup on the user's part to get it working with Pages, which is why
create-hono
is used here.Discussions about this has also been made here: honojs/hono#838
Please review @yusukebe
Documentation checklist
Closes #15785