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.
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.
Most helpful comment
@jzabala got it exactly right :)
If you already have your URLs deployed somewhere, just use those directly.
```json5
{
"ci": {
// ...,
"collect": {
"url": ["http://example-1.com", "http://example-2.com"]
}
}
}