Replies: 1 comment
-
Hi @dcsan You can check Service Bindings. For Cloudflare Workers, as the application grows, it is a good idea to split it up by endpoint using Service Bindings. |
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
-
I have fairly large app I'm porting to CF workers and looking at hono
is it best practice to have multiple top-level entrypoint files that import only the resources you would need for a set of endpoints?
having a normal 'mono-app' index that imports and sets up all the routes would seem to be a lot of startup (and RAM) overhead for running a single API call, esp if workers are destroyed between calls.
or does cloudflare do some type of tree shaking behind the scenes for each endpoint?
when i've done this with GCP every API endpoint was effectively a separate entrypoint that handled it's own minimal imports
if I did go that way, i'm not sure how to start up the app locally in dev mode, as there would need to be many apps effectively.
https://hono.dev/guides/best-practices#building-a-larger-application
Beta Was this translation helpful? Give feedback.
All reactions