When using routing i have to define the binding for each of the routes when i instance Hono? #2257
Unanswered
jonathan-gantes
asked this question in
Q&A
Replies: 1 comment
-
You don't need it. If you define the Bindings or Variables, they are used all route as the same. Creating and using instances is for routing purposes; only one instance actually handles the request. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Im checking your guide https://hono.dev/guides/best-practices#building-a-larger-application
I wan to use routing because i want to create one api for all my liteweight requests of catalogs data, my question its if i need to add the bindings in each of the app = new Hono() of each route or is there any way to inherit context/bindings to each route from main router?
and other thing if i create an env on the main router can i use it on child routes?
Beta Was this translation helpful? Give feedback.
All reactions