honojs / website Goto Github PK
View Code? Open in Web Editor NEWRepository for hono.dev
Home Page: https://hono.dev
Repository for hono.dev
Home Page: https://hono.dev
On your docs page, you talk about TS and show only TS examples: https://github.com/honojs/website/blob/main/getting-started/bun.md
You might want to add a one-liner that JS is of course also supported in Bun.. The documentation seems a bit misleading IMO.
We have to add the documents for v4 until Feb, 9th. Let's work on v4 branch.
jsx/dom
startTrandition
and useTransition
- honojs/hono#1996startViewTransition
- honojs/hono#2021useViewTransition()
and viewTransition()
- honojs/hono#2053PropsWithChildren
- honojs/hono#2151ssgParams
- honojs/hono#1960mimes
option for serve-static - honojs/hono#2094The link for "Building a larger application" in the RPC section of the docs should point to the "Building a larger application" section on the "Best Practices" page, but points to a section/fragment on the "RPC" guide that does not exist!
Relevant Link: https://hono.dev/guides/rpc#using-with-larger-applications
I think this can be fixed by updating the link in the docs here to point to /guides/best-practices#building-a-larger-application
.
Happy to make this quick fix or let someone else handle! Thanks for the awesome docs!
Developers can create and verify their own JWTs using Hono Jwt utilities. However, this is not documented.
I'd be happy to add this documentation. I'd suggest adding it as follows:
Please let me know if you'd like me to proceed and confirm where you'd want this in the docs.
Testing: https://hono.dev/guides/testing
We have to replace "jest" with "vitest" since Cloudflare recommends using "vitest" with @cloudflare/vitest-pool-workers
.
We have to write "How to write your middleware".
next
: honojs/hono#960 (comment)createMiddleware()
method.Working on v3.2 branch.
app.routerName
app.mount()
basePath()
Hey the docs from this link https://hono.dev/guides/jsx are returning a 404
Hey everyone! I made an adapter for Azure Functions.
I think it would be great to add an "Azure Functions" page to the Getting Started section.
I noticed that most of the adapters/middlewares/helpers are from the official "hono" account.
Would you allow for my library to be part of the docs, or is there another way we could do this? @yusukebe
Thanks!
TODOs for "v3"
honojs.dev
to hono.dev
The test below uses Jest's Miniflare environment, but it needs to be changed to one using Wrangler's unstable_dev
.
These additions could help:
1: explain which runtimes are currently supported
2: add example code that ties together server side components with client components
3: give a robust example of how to use the render() function. How can I insert my client components into other components?
4: explain how it's possible to access the document object in the example code
5: explain how changing the tsconfig to "hono/jsx/dom" affects the other jsx components you've made. (Using bun & vscode, this causes linting errors for all my existing jsx components)
Overall, it just needs a more thorough explanation of setup and use because it currently has no examples of how to utilize hono client components along with regular server components. (is this even possible?)
List of sections we are planning to add
Related honojs/hono#1512
Supabase Edge Functions is listed as not tested, but there is supabase-functions.md
.
So I think this file should be removed.
Related: honojs/hono#664 (comment)
I think we should now only recommend npm:Hono in the getting started tutorial for deno
When I go to 404 page and try to go home, there is no home.
I can redirect locally but I can't on hono.dev.
as title
By visiting Get Started > Bun, I did not see any command (script) to install from an existing project.
Split this site (Section 2. Setup) into 2 parts, the first part presents a new project by using bun creat project by using bun create hono my-app
. The second part presents using bun install ...
.
I have a folder already, just need to bun install hono..
instead
Hi
https://hono.dev/helpers/html#receives-props-and-embeds-values
I'm not sure but this looks like a mistake. HTML examples shouldn't contain JSX syntax.
The addition of a FAQs section was discussed in the Organization's discussion.
This issue was created to tie in with that discussion.
/guides/faq
pageWhile attempting to use the Cache API for caching HTTP responses on Deno Deploy, it was discovered that the caches
variable is unavailable in the deployment environment.
Need to add a note on the documentation making it clear that it is not supported.
The syntax highlighting for the parts that use JSX was ts and js.
We believe these should be corrected to jsx or tsx, but what do you think?
The relevant parts are as follows.
When deploying Hono to a production environment with the Node.js runtime, I expect to deploy it in a container.
So it would be nice to have a sample Dockerfile in the documentation.
The hono stacks page showing RPC react example with posts and gets is really useful showing how hono and RPC with tanstack query can be used for frontend and backend.
However to get the example working I had to change the way the mutation worked by adding mutationFN. Could be worth updating the page?
Current code example
const mutation = useMutation<
InferResponseType<typeof $post>,
Error,
InferRequestType<typeof $post>['form']
>(
async (todo) => {
const res = await $post({
form: todo,
})
return await res.json()
},
{
onSuccess: async () => {
queryClient.invalidateQueries({ queryKey: ['todos'] })
},
onError: (error) => {
console.log(error)
},
}
)
Changed to
const mutation = useMutation<
InferResponseType<typeof $post>,
Error,
InferRequestType<typeof $post>['form']
>({
// Mutation function
mutationFn: async (todo) => {
const res = await $post({
form: todo,
});
return await res.json()
},
// Success handler
onSuccess: async () => {
queryClient.invalidateQueries({ queryKey: ['todos'] })
},
// Error handler
onError: (error: Error) => {
console.error(error)
},
})
npx wrangler init -y
creates package.json
, so npm init -y
might not need to be run. If so, I will create a pull request to correct the installation part.
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).
I would like to write a feature update for hono v4. However, it is difficult to merge this into the main branch, so if you could create a next or v4 branch soon, I can get started on this.
Hi, I have written a hono-method-override plugin, it's similar to a middleware, but it's not(middleware api can not implement this feature).
So, where should I put the link in the document to let the community quickly find it
Related to honojs/hono#1657
Documentation mentions that strict mode is set to false
by default -> https://hono.dev/api/hono#strict-mode
But it is not https://github.com/honojs/hono/blob/main/src/hono.ts#L61
Documentation should be changed or strict mode set to false?
Currently, documents for Built-in middleware are incomplete. The explanation is too simple, and no description of "options".
I've written the page for Pretty JSON Middleware: https://honojs.dev/docs/builtin-middleware/pretty-json/
We will complete the other middleware pages using this as a reference.
As my personal experience, when I first go to logger middleware site, I need to find more relative examples about this middleware (customize the message using logger: (fn?: PrintFunc))
)
How about adding a search feature with "FlexSearch". The theme support it:
This!:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.