1.1.5 • Published 6 years ago

get-server-response-time v1.1.5

Weekly downloads
8
License
MIT
Repository
github
Last release
6 years ago

get-server-response-time NPM version

Module for checking the response time of the server for node.js and browser

Installation

$ npm install --save get-server-response-time

Usage

for the node.js/server

const getServerResponseTime = require('get-server-response-time')

for the browser/client

const getServerResponseTime = require('get-server-response-time/client')

Example

var getServerResponseTime = require('get-server-response-time')

//simple call
getServerResponseTime('https://google.com')
    .then(responseTime => {
        console.log(responseTime)
    })

//call with additional parameters
getServerResponseTime('https://google.com', {
    timeout: 5000 //maximum waiting time for server response | default: 5000
    responseInCaseError: true //Whether to return the response time of the server in case of an error | default: true
})
    .then(responseTime => {
        console.log(responseTime)
    })

License

MIT © jeckyhit

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago