Skip to content

About

Simple ping utility for latency tests on Zeit Now

Resources

Stars

4 stars

Watchers

0 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

micro-ping

npm version Greenkeeper badge

Simple utility for testing network latency from Zeit datacenters

Can also be imported and used a node module.

Usage

Deployed to Zeit Now

If you haven't installed now already, start by following these instructions

To deploy the service use the following command:

now NathanielHill/micro-ping

A unique deployment URL will be returned (and copied to the clipboard), now make sure to scale your deployment to the datacenter you want to test from.

For example, let's test from bru1:

now scale <deployment-url> all 0 0
now scale <deployment-url> bru1 0 1

You may also want to create an alias:

now alias <unique-deployment-url> ping.<your-domain.com>

Now, test away:

$ curl "<deployment-url>/?host=example.com&n=100"
{"host":"example.com","n":"100","avg":"75.550","stddev":"0.317"}
As a node module

Can also be used as a node module in your own project.

To install:

yarn add micro-ping

or

npm install --save micro-ping

The default export takes an optional config object and runs the microservice. Usage will look something like this:

const microPing = require('micro-ping')

microPing({ port: 80, log = true, n = 10 })

Author

About

Simple ping utility for latency tests on Zeit Now

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages