Lighthouse-ci: How to run without local server?

Created on 30 Nov 2019  路  3Comments  路  Source: GoogleChrome/lighthouse-ci

I'd like to run lhci autorun for configured URLs without the need to start a local server or define a static dist dir.

Did I miss something or is it needed to run a local server? We deploy our applications to a remote host and want to run lhci against URLs on an external server.

question

Most helpful comment

@jzabala got it exactly right :)

If you already have your URLs deployed somewhere, just use those directly.

lhci autorun --collect.url=http://example-1.com --collect.url=http://example-2.com

```json5
{
"ci": {
// ...,
"collect": {
"url": ["http://example-1.com", "http://example-2.com"]
}
}
}

All 3 comments

Hi @thasmo you don't need to run a local server. You can setup the urls where you want Lighthouse to run using the url arg of the collect command:

For example:

lhci collect --url=https://example-1.com --url=https://example-2.com

You can also use a lighthouserc.json config file.

{
  "ci": {
    ...,
    "collect": {
      "url": ["https://example-1.com"]
    }
  }
}

https://github.com/GoogleChrome/lighthouse-ci/blob/master/docs/configuration.md#non-nodejs-server

https://github.com/GoogleChrome/lighthouse-ci/blob/master/docs/cli.md#collect

@jzabala got it exactly right :)

If you already have your URLs deployed somewhere, just use those directly.

lhci autorun --collect.url=http://example-1.com --collect.url=http://example-2.com

```json5
{
"ci": {
// ...,
"collect": {
"url": ["http://example-1.com", "http://example-2.com"]
}
}
}

Closing as resolved. Please file a new issue if you there any further problems.

Was this page helpful?
0 / 5 - 0 ratings