psi-local
Use PageSpeed Insights locally!
Using
npm install psi-local --save-dev
- run your application locally (e.g. http://localhost:3000)
- create
.js
file and require module:const psi = ;; - run
node <your-file>.js
Additional
Module contains the only function and returns Promise
for more the best usability. You can easily use ES2017 syntax for working with psi-local
as this promise
is never rejected. If some errors occur, it will return object { err: Error }
{ const port = 3000; const stats = await ; if statserr return ; return ; }
MIT License
Fill free to use and contribute