Replies: 2 comments 2 replies
-
Indeed, I believe that separating "apps" and then combining them using const feed = new Hono();
const feedRoutes = feed.get('/foo', (c) => c.jsonT(0)).post('/bar', (c) => c.jsonT('a'));
const item = new Hono();
const itemRoutes = item.get('/foo', (c) => c.jsonT(0)).post('/bar', (c) => c.jsonT('a'));
const mainApp = new Hono();
const allRoutes = mainApp.route('/feed', feedRoutes).route('/item', itemRoutes); For more insights, @subhendupsingh has written a fantastic guide on the topic. Check it out!: |
Beta Was this translation helpful? Give feedback.
1 reply
-
Just use tRPC instead. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
All the examples for RPC only shows one route as an example. What is the best way to implement this with multiple routes? Or even, multiple app instances used as routes?
Like this:
The documentation doesn't really mention anything about this. Do we need to handle the type for each route and export them manually or what is the best way?
Beta Was this translation helpful? Give feedback.
All reactions