yarn install
yarn devTo create a production version of your app:
yarn buildYou can preview the production build with yarn preview.
Once changes are made, build the JS:
yarn lambda:compileIf you want to test the lambda function locally you can use:
node -e 'require("./index").handler()'You'll just have to set a test image, or pass one in.
Since the output is in base64, you can copy it an convert it to an image using this converter.
Zip the code (this also excludes the node_modules because canvas is handled by a Lambda Layer):
yarn lambda:zipAnd deploy it:
yarn lambda:deployIf not authenticated:
aws ecr get-login-password --region us-east-2 | docker login --username AWS --password-stdin <AWS-ACCOUNT-ID>.dkr.ecr.us-east-2.amazonaws.com
