is-site-down
v2.0.1
Published
Checks if a website is down for everyone
Downloads
3
Readme
is-site-down
Checks if a website is down for everyone
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
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
- 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
- is-site-down-cli CLI for is-site-down module
Contribution
Suggestions and PRs are welcome!
Please create issue or open PR request for contribution.
License
refer LICENSE
file in this repository.