Skip to content

Hono app delegate utility #4051

@jasonkuhrt

Description

@jasonkuhrt

What is the feature you are proposing?

I am doing my own integration between Vite and Hono, using the existing plugin as a reference. While implementing the entry wrapper I thought it would be nice to have a core utility to delegate from one Hono app instance to another. The pattern to do so is at once simple but also not obvious. The logic of how to correctly forward from a route handler to a sub-app should be encapsulated. There may be best practices about how to do this, or could be in the future, that should be owned by the library.

Here is the code I wrote:

Image

Here is what I wish I could have written:

${_.app}.delegateAll('*', ${_.entry})

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions