lighthouse-action icon indicating copy to clipboard operation
lighthouse-action copied to clipboard

Feature request: include web server

Open georgeboot opened this issue 6 years ago • 3 comments

It would be super handy if this package could also include a super simple web server.

Currently, we're building a Vue app, but there is no way to have the dist/index.html audited, since there is no webserver.

We're currently using Netlify, but the action runs faster then Netlify can deploy, so it fails (when the action runs, Netlify has not yet finished deploying the preview, meaning a 404 response).

If the package could also have a path option, one could simply point to the directory of static html files and have this action start a simple webserver and audit against that.

georgeboot avatar Sep 27 '19 13:09 georgeboot

Hi there, apologies for the late reply!

This crossed my mind too and I'll look into the best way to do this — maybe a simple one-line Python server like python -m SimpleHTTPServer 8000 would suffice. As for the Netlify race condition, this is at the top of my to-do list (also discussed in #14) since this is likely a problem in 99% of use cases. I'll keep you posted, thanks for reaching out!

jakejarvis avatar Oct 13 '19 14:10 jakejarvis

We would also love to use this with a local server.

Use Case: next.js server

Steps:

  1. yarn build
  2. yarn start (never finishes since the server is running)
  3. run lighthouse action

Thanks in advance

pixelass avatar Jul 28 '21 06:07 pixelass

Perhaps this package could be of use? https://github.com/marketplace/actions/http-server-action

georgeboot avatar Jul 28 '21 10:07 georgeboot