npx lighthouse http://localhost:3000 --view

Category: Web App Development

npx lighthouse http://localhost:3000 --view

Audit a local dev site and open the report

Runs Lighthouse against your local server and opens the HTML report in the browser with --view. Testing localhost catches performance regressions before they ship. Note that local machines often score differently than production hardware.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.