Integrating Hono RPC with Turborepo Structure #2683
Replies: 4 comments 10 replies
-
Why not? I've done this with a NestJS api in the past. To keep things from getting messy I have a package called |
Beta Was this translation helpful? Give feedback.
-
Hey, Now I facing another issue. The types are different when I am exporting from the API and when I am using on the client side. |
Beta Was this translation helpful? Give feedback.
-
Remove the |
Beta Was this translation helpful? Give feedback.
-
hey @HarshitKmr10 got any fix for the issue? |
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
I'm building an application using turborepo with the following structure:
I'm keen on utilizing Hono's RPC functionality to export API route types from the
api
app and integrate them into my Next.js application in theweb
app. However, the challenge arises due to turborepo's design, where apps cannot directly share imports.One potential solution I considered was moving the API to the
packages
directory. However, this deviates from the recommended practice of keeping applications withinapps
andpackages
dedicated to reusable functionality.Question:
Is there a viable approach to achieve my goal of using Hono RPC with API route types in the Next.js app while adhering to the preferred turborepo structure?
Beta Was this translation helpful? Give feedback.
All reactions