Send Lighthouse SpeedTest results to your email
npm install lighthouse-scoresGet Lighthouse scoring via Google PageSpeed Insights delivered to your email.
| 
| -
Add email and general configurations to /configuration/config.js
Add pages configurations to /configuration/pages.json
Example configuration files
> #### configuration/pages.json
> ``json`
> {
> "Example": "https://example.net/",
> "Start Page" : "https://www.start.co.il"
> }
>
> #### configuration/config.json
> `json`
> {
> "email": {
> "to": "t-800@google.com",
> "authUser": "admin@skynet.net",
> "authPassword": "
> },
> "lightHouseApiKey": "
>}
>
To load configurations during run time from external file, use docker volume.
``
-v "$(pwd)"/pages.json:/usr/src/app/configuration/pages.json
``
docker pull fiverr/lighthouse-scores-to-email:latest
Export your variables to the environment and pass them through alongside your pages.json file
``
docker run \
-v "$(pwd)"/pages.json:/usr/src/app/configuration/pages.json \
-e APIKEY \
-e AUTH_USER \
-e AUTH_PASSWORD \
-e EMAIL_TO \
-e STATSD_HOST \
-e STATSD_PORT \
fiverr/lighthouse-scores-to-email:latest
Or send as config file
``
docker run \
-v "$(pwd)"/pages.json:/usr/src/app/configuration/pages.json \
-v "$(pwd)"/config.json:/usr/src/app/configuration/config.json \
fiverr/lighthouse-scores-to-email:latest
Get your PageSpeed API key.
Use Gmail with Google's app passwords.

| Env Variable | Config File path | Value | Default
| - | - | - | -
| APIKEY | lightHouseApiKey | SpeedTest API Key | __Mandatory__AUTH_USER
| | email.authUser | Email username | NoneAUTH_PASSWORD
| | email.authPassword | App password | NoneEMAIL_TO
| | email.to | Recipient Email address | NoneEMAIL_FROM
| | email.from | Sender Email address | Lighthouse Gazette EMAIL_SUBJECT
| | email.subject | Subject of the email | Google LightHouse Report ✔EMAIL_HOST
| | email.host | SMTP host | smtp.gmail.comEMAIL_PORT
| | email.port | SMTP port | 465STATSD_HOST
| | statsd.host | StatsD hosname | NoneSTATSD_PORT
| | statsd.port | StatsD port | 8125STATSD_PREFIX
| | statsd.prefix | Custom prefix to metric | lighthouse_scores_to_emailSECURE
| | email.secure | Should use SSL | truecategories
| - | | Lighthouse categories | ['PERFORMANCE', 'SEO', 'ACCESSIBILITY', 'BEST_PRACTICES']strategies
| - | | Lighthouse strategies | ['MOBILE', 'DESKTOP']
> #### configuration/config.json
> `json``
> {
> "email": {
> "list": [
> {
> "text": "Email provided by Fiverr SRE team",
> "url": "https://play.grafana.org/"
> },
> {
> "text": "View trends on Grafana dashborad",
> "url": "https://play.grafana.org/"
> }
> ]
> }
> }
>