A Next.js 10 application template that includes Puppeteer and chrome-aws-lambda. This application is a simple showcase of how to setup chrome-aws-lambda using puppeteer, and an example api route that screenshots another page and returns it as the response body.
- Install dependencies via
yarn install
- Run
yarn dev
- If you are screenshotting pages in this application, for local development Puppeteer's waitfor value must be set to
networkidle2
to prevent hanging, because the dev server keeps 1+ connections alive for quick-refreshing the page. For Lambda environments, this should be set tonetworkidle0
.