Lighthouse

Run Lighthouse on demand

lighthouse.js
const mql = require('@microlink/mql')

const lighthouse = async (url, opts) => {
  const { data } = await mql(url, {
    meta: false,
    technologies: false,
    insights: {
      lighthouse: {
        preset: 'lr-mobile'
      }
    },
    ...opts
  })

  return data.insights.lighthouse
}

const result = await lighthouse('https://example.com')

mql.render(result)