GithubHelp home page GithubHelp logo

rellwood / lighthouse-report Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 10 KB

A cloud function that runs a Google Lighthouse report on an array of Urls and loads the results into BigQuery and emails the results to a specified email address

License: Apache License 2.0

JavaScript 100.00%

lighthouse-report's Introduction

Lighthouse-Report

Lighthouse is quick and easy way to analyzes web apps and web pages, collecting modern performance metrics and insights on developer best practices.

Lighthouse-Reports uses Lighthouse to run reports, returning the results in multiple formats to be used at a later date for analysis or review.

If you want to run this in a Serverless Cloud Function, you will want to deploy the cloudFunction.js

The System currently takes in an array of URLs and an email address and loads the results of that reports into a specified BigQuery table and then emails the user a PDF report of the run.

Acknowledgements

Authors

Usage/Examples

The main function to use for deployment is the cloudFunction.js file. An example of the request body to the cloud function would look like below

{
    "urls": [
        "https://example.com",
        "https://example2.com"
    ],
        "email": "[email protected]"
}

The request body should be in JSON format with the urls as an array of URLs that you want to run a Lighthouse report on.
The email property should be a string representing the email address to which the PDF report should be sent.

Notes: You will want to specify BQ dataset, tableID, API Key, etc ENV variables in the cloud function.

Roadmap

  • Adding ability to export as CSV or JSON
  • Ability to export to BigQuery - Completed
  • Script to make this serverless so it can be deployed to a Cloud Function/Lambda - Completed
  • Add option to deploy this as an API that will return results

License

License

lighthouse-report's People

Contributors

rellwood avatar

Stargazers

 avatar

Watchers

 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.