siilisolutions / hedge

a serverless solution for clojure
Eclipse Public License 1.0
39 stars 6 forks source link

Proper node module and external javascript support #46

Open jikuja opened 6 years ago

jikuja commented 6 years ago

Current implementations do not include node modules into artifacts.

Fix that:

Current implementation is using advanced closure compiler optimization level

Fix that:

Ideas, discussion and help wanted.

iisulop commented 6 years ago

Azure's zipdeploy allows automatic installation of npm dependencies to the function app environment by declaring them in package.json and enabling Kudu's build phase. To enable the build phase add a file called .deployment to the zip file's root with the following contents:

[config]
SCM_DO_BUILD_DURING_DEPLOYMENT=true

However how to do the same on AWS should be investigated as similar dependency installation is not supported. AWS suggest downloading the dependencies locally or to an EC2 instance and adding them to the zip to be deployed. For npm packages including native code compiling them locally and pushing to AWS might fail due to incompatible executables.