Deploying an app which uses hono RPC #3772
Unanswered
jnatmorris
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just got a VPS recently and completely new to deploying apps using docker and wanted to see if anyone else has had a better idea than I when it comes to using hono RPC.
I have developed a hono server, as well as nextjs frontend. The nextjs application makes api calls using RPC via importing the hono server type. The type is imported by an ugly
import type { AppType } from "../../server/src/index";
, which breaks out of the nextjs directory and finds the server in the hono server directory.I'm planning on containerizing them separately. During the development the above code is not a problem as the server is visible to the nextjs application, even if ugly. When dockerizing my nextjs application I realized my mistake, unless I copy the server code into the image prior to building, obviously the build fails as the server, specifically server type, is not present for the client hono RPC code.
Possible solutions I've thought of:
If anyone has any ideas, I'd be more than happy to hear any suggestions.
Beta Was this translation helpful? Give feedback.
All reactions