NOTE: There is a new beta which supports dependency management via a package.json file. See https://docs.google.com/document/d/e/2PACX-1vRGX60V2wQ2Co9X1NO73hkLObcQdNWp2i49XE-pY_DRS6UjZnv4UuODz4nsI_g1gUIXFC1MhN4AFsnZ/pub for more information
Simple boilerplate for using webpack to bundle serverless function with third-party deps
git clone
this repoyarn install
- If you're not yet set up with the CMS CLI and have a specified
defaultPortal
, useyarn hs init
to generate a CMS Personal Access Key. yarn build
to build with webpack into/dist
yarn deploy
to build and deploy todefaultPortal
yarn start
to build, deploy, and watch/auto-upload todefaultPortal
]
- Via Settings > Integrations > API Key, copy your API key.
- Use
hs secrets add APIKEY < your api key here>
to give access to this key in your serverless functions viaprocess.env
. Read more about this feature here.