sparse-intern-71089
09/30/2023, 6:56 PMbillowy-army-68599
crooked-plastic-7855
09/30/2023, 9:47 PMpackages/core
contains the entirety of the business logic. The apps/fns
is the middle place where the core package is imported and exposed to the lambda handler and the apps/infrastructure
holds the pulumi code which deploys the lambda with the code in fns app.
The following are the solutions I’ve tried:
• Created a callback function that imports the fns app directly into infrastructure and calls its exports inside of the callback. The result is that the dependencies from core are logged as not found.
• Archives do not work because it requires the code be in javascript first.
• Tried creating a docker image in which I bundle the code in esbuild but because the dockerfile is located in fns, it doesn’t include the code from packages/core nor the pnpm-lock file that is at the root.
• Also tried bundling it outside of the docker image, in the pulumi file but for some packages the architecture mismatches from the lambda one.
What I’m trying to achieve is the separation of infrastructure, backend code as (micro tasks) and web and trying to reuse as much as code as possible (core) between backend and frontend.billowy-army-68599
crooked-plastic-7855
10/01/2023, 12:42 AMbillowy-army-68599
crooked-plastic-7855
10/01/2023, 1:19 AM