Code Monkey home page Code Monkey logo

serverless-chrome's Introduction

serverless-chrome

Serverless Chrome contains everything you need to get started running headless Chrome on AWS Lambda (possibly Azure and GCP Functions soon).

The aim of this project is to provide the scaffolding for using Headless Chrome during a serverless function invocation. Serverless Chrome takes care of building and bundling the Chrome binaries and making sure Chrome is running when your serverless function executes. In addition, this project also provides a few example services for common patterns (e.g. taking a screenshot of a page, printing to PDF, some scraping, etc.)

Why? Because it's neat. It also opens up interesting possibilities for using the Chrome DevTools Protocol (and tools like Chromeless or Puppeteer) in serverless architectures and doing testing/CI, web-scraping, pre-rendering, etc.

CircleCI David David GitHub release

Contents

  1. Quick Start
  2. The Project
  3. Examples
  4. Documentation & Resources
    1. Building Headless Chrome/Chromium
  5. Testing
  6. Roadmap
  7. Projects & Companies using serverless-chrome
  8. Change log
  9. Contributing
  10. Prior Art
  11. License

Quick Start

"Bla bla bla! I just want to start coding!" No problem:

Using AWS Lambda, the quickest way to get started is with the Serverless-framework CLI.

First, install serverless globally (npm install -g serverless) and then:

serverless create -u https://github.com/adieuadieu/serverless-chrome/tree/master/examples/serverless-framework/aws

Then, you must configure your AWS credentials either by defining AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environmental variables, or using an AWS profile. You can read more about this on the Serverless Credentials Guide.

In short, either:

export AWS_PROFILE=<your-profile-name>

or

export AWS_ACCESS_KEY_ID=<your-key-here>
export AWS_SECRET_ACCESS_KEY=<your-secret-key-here>

Then, to deploy the service and all of its functions:

npm run deploy

Further details are available in the Serverless Lambda example.

The Project

This project contains:

Examples

A collection of example functions for different providers and frameworks.

Serverless-framework

Documentation & Resources

Building Headless Chrome/Chromium

Testing

Test with npm test. Each package also contains it's own integration tests which can be run with npm run test:integration.

Roadmap

1.1

  1. Support for Google Cloud Functions
  2. Example for Apex
  3. Example for Claudia.js

1.2

  1. DOM manipulation and scraping example handler

Future

  1. Support for Azure Functions
  2. Headless Firefox

Projects & Companies using serverless-chrome

Tell us about your project on the Wiki!

Change log

See the CHANGELOG

Contributing

OMG. Yes. Plz, halp meeee.

Prior Art

This project was inspired in various ways by the following projects:

License

serverless-chromeMarco L眉thy. Released under the MIT license.
Authored and maintained by Marco L眉thy with help from contributors.

github.com/adieuadieu 路 GitHub @adieuadieu 路 Twitter @adieuadieu 路 Medium @marco.luethy

serverless-chrome's People

Contributors

adieuadieu avatar akashmohapatra avatar albinekb avatar benjaminwood avatar botsimo avatar dobesv avatar orporan avatar patrickjs avatar qubyte avatar willfarrell avatar zachschultz avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    馃枛 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 馃搳馃搱馃帀

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google 鉂わ笍 Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.