@amygroshek i've made some changes that should get things (kind of) running again. the main changes are:
migrated from archived project chromeless to puppeteer for PDF generation (has a couple layout issues, might just need proper viewport to be set)
using node-canvas-lambda lambda layer for canvas (canvas is a dev dependency for local development)
using chrome-aws-lambda layer for puppeteer (puppeteer is a dev dependency for local development)
added some typescript compiling for local development outside of serverless (dev dependency)
i've added a helper script with some sample data in creator.ts if you want to generate files locally without touching serverless:
npm run create-pdf: generates a sample PDF
npm run create-xlsx: generates a sample excel file
npm run create-pptx: generates a sample powerpoint
files generated by these commands will be in the root directory named file.{FILETYPE}
on top of that you should also be able to run serverless in offline mode and have it generate the files and upload to S3 using the commands you had already created:
npm run offline-pdf: runs serverless offline endpoint for PDF generation
i haven't looked into deploying this to the infrastructure yet, might be worth creating new endpoints so we can fallback to the old if anything goes wrong.
hopefully this is enough to get you started developing locally.
@amygroshek i've made some changes that should get things (kind of) running again. the main changes are:
canvas
(canvas
is a dev dependency for local development)puppeteer
(puppeteer
is a dev dependency for local development)i've added a helper script with some sample data in
creator.ts
if you want to generate files locally without touching serverless:npm run create-pdf
: generates a sample PDFnpm run create-xlsx
: generates a sample excel filenpm run create-pptx
: generates a sample powerpointfiles generated by these commands will be in the root directory named
file.{FILETYPE}
on top of that you should also be able to run serverless in offline mode and have it generate the files and upload to S3 using the commands you had already created:
npm run offline-pdf
: runs serverless offline endpoint for PDF generationi haven't looked into deploying this to the infrastructure yet, might be worth creating new endpoints so we can fallback to the old if anything goes wrong.
hopefully this is enough to get you started developing locally.