Serverless-framework Headless Chrome Plugin
A Serverless-framework plugin which bundles the @serverless-chrome/lambda package and ensures that Headless Chrome is running when your function handler is invoked.
Contents
Installation
Install with yarn:
yarn add --dev serverless-plugin-headless-chrome
Install with npm:
npm install --save-dev serverless-plugin-headless-chrome
Requires Node 6.10 runtime.
Setup
Add the following plugin to your serverless.yml
:
plugins: - serverless-plugin-headless-chrome
Then, in your handler code.. Do whatever you want. Chrome is running!
const CDP = moduleexports { // Chrome is already running! CDP }
Configuration
todo: via custom variables you can pass chrome flags.
Local Development
Local development is supported. A locally installed version of Chrome will be launched.