is-site-down

Checks if a website is down for rest of world


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.

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.