Build a Node.js tool to record and compare Google Lighthouse reports

Click for: original source

In this tutorial, Luke Harrison shows you step by step how to create a simple tool in Node.js to run Google Lighthouse audits via the command line, save the reports they generate in JSON format and then compare them so web performance can be monitored as the website grows and develops.

If a previous report already exists for the same website when a Lighthouse audit is complete, automatically perform a comparison against it and show any changes to key performance metrics.

The article is split into these sections:

  • What is Google Lighthouse?
  • Setup
  • Opening Chrome with Node.js
  • Running Lighthouse programmatically
  • Saving Lighthouse reports
  • Comparing Lighthouse reports

… and much more. You will also get complete source code for this detailed tutorial. Superb!

[Read More]

Tags web-development open-source nodejs