2.0.1 • Published 5 years ago

is-site-down v2.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

is-site-down

Checks if a website is down for everyone

Build Status PRs Welcome GitHub issues HitCount

NPM

Install

$ npm install is-site-down --save

or

yarn add is-site-down

Usage

const { isSiteDown } = require('is-site-down');

isSiteDown('https://about.theanubhav.com').then(console.log);

Above call returns following response

{
	"host": "about.theanubhav.com",
	"isitdown": false,
	"response_code": 200
}

API Specification

isSiteDown

  • returns - Promise
  • arguments - siteUrl // e.g theanubhav.com

  • Result Data

  1. Success :

    {
        "host": "about.theanubhav.com",
        "isitdown": false,
        "response_code": 200
    }

Description properties of icon object:

  • "host" - string, URL which was queried for status
  • "isitdown" : Boolean, whether site was down
  • "response_code", number, response returned by server
  1. Failure :

All error messages have the following format

{ error: 'Too many requests to the same site.' }

Reference

is-site-down uses HTTP API from isitdown.site. Refer service API sample here.

Environment

Currently, is-site-down is supported for Nodejs Environment only. Please open a issue for browser support, if required.

Related Module

Contribution

Suggestions and PRs are welcome!

Please create issue or open PR request for contribution.

License

Open Source Love

refer LICENSE file in this repository.

2.0.1

5 years ago

2.0.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.2

5 years ago