pagespeed-command

command module
v0.0.0-...-f924fc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

README

PageSpeed Commmand

Get the performance score of a website with the Google PageSpeed API on the command line.

Requirements

Create a Google PageSpeed API key on your Google Cloud account (https://console.cloud.google.com/apis/credentials)

Set the API key in a .env file in the root of the project or in .env.local file.

Usage

# run with default strategy
$ go run main.go -url https://www.example.com
{"url":"https://www.example.com","strategy":"DESKTOP","score":1,"date":"2023-04-01T01:01:01.352859963+02:00"}

# run with mobile strategy
$ go run main.go -url https://www.example.com -strategy mobile

# build binary in ./build directory
$ make build
$ ./build/pagespeed -url https://www.example.com

Doc

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL