https://github.com/anubhavsrivastava/is-site-down
Checks if a website is down for rest of world
https://github.com/anubhavsrivastava/is-site-down
Last synced: 7 months ago
JSON representation
Checks if a website is down for rest of world
- Host: GitHub
- URL: https://github.com/anubhavsrivastava/is-site-down
- Owner: anubhavsrivastava
- License: mit
- Created: 2019-08-01T11:08:38.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T06:12:59.000Z (almost 3 years ago)
- Last Synced: 2025-02-09T08:46:28.921Z (9 months ago)
- Language: JavaScript
- Homepage: https://anubhavsrivastava.github.io/is-site-down/
- Size: 699 KB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# is-site-down
Checks if a website is down for everyone
[](https://travis-ci.org/anubhavsrivastava/is-site-down)
[](http://makeapullrequest.com)
[](https://github.com/anubhavsrivastava/is-site-down/issues)
[](http://hits.dwyl.io/anubhavsrivastava/is-site-down)
[](https://nodei.co/npm/is-site-down/)
### Install
```
$ npm install is-site-down --save
```
or
```
yarn add is-site-down
```
### Usage
```js
const { isSiteDown } = require('is-site-down');
isSiteDown('https://about.theanubhav.com').then(console.log);
```
Above call returns following `response`
```json
{
"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
2. 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](https://isitdown.site). Refer service API sample [here](https://isitdown.site/api/v3/google.com).
### 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](https://github.com/anubhavsrivastava/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
[](LICENSE)
refer `LICENSE` file in this repository.