speedtest-service

1.0.4 • Public • Published

Speedtest Service


A simple speedtest CLI and package that leverages the Speedtest.net CLI tool.

Prequesties


Ensure that speedtest is installed. Available here.

Mac OS:

brew tap teamookla/speedtest 
brew update
brew install speedtest

Debian/Ubuntu:

sudo apt-get install curl
curl -s https://install.speedtest.net/app/cli/install.deb.sh | sudo bash
sudo apt-get install speedtest

Fedora/RedHat/CentOS:

curl -s https://install.speedtest.net/app/cli/install.rpm.sh | sudo bash
sudo yum install speedtest

Module


Install with NPM

npm install --save speedtest-service

Install with Yarn

yarn add speedtest-service

Example usage

const speedtest = require('speedtest-service');

const result = speedtest();

console.log(result);

Example output

{
  server: { 
    org: 'YouFibre', 
    location: 'Manchester', 
    id: '48475' 
  },
  isp: 'Hyperoptic Ltd',
  latency: '2.05 ms',
  download: '195.15 Mbps',
  upload: '368.53 Mbps',
  packetLoss: 'Not available.',
  resultUrl: 'https://www.speedtest.net/result/c/2b753g91-24h5-67aa-111g-7g999a9a99aa'
}

CLI


Install the CLI

$ git clone git@github.com:dewhurstwill/speedtest-service.git
$ cd speedtest-service
$ npm run install-cli

Uninstall the CLI

$ git clone git@github.com:dewhurstwill/speedtest-service.git
$ cd speedtest-service
$ npm run uninstall-cli

Using the CLI

$ speedtest-cli --help
Usage:
speedtest-cli run [--debug -d -D] [--help -h -H]
or
speedtest-cli help

$ speedtest-cli run

Readme

Keywords

none

Package Sidebar

Install

npm i speedtest-service

Weekly Downloads

13

Version

1.0.4

License

MIT

Unpacked Size

7.75 kB

Total Files

11

Last publish

Collaborators

  • dewhurstwill