AdirAmsalem / isup

Check if a website is up or down - https://www.npmjs.com/package/isup

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

isup

With isup you can easily check if a website is up or down.

Getting started

First, you need to install:

npm install -g isup

Then, you can use it both from the command line and as a module.

cli

isup github.com

// github.com is up
// github.com is down

Node.js

Note: when using that as a module, it's better to install it locally and also use the '--save' flag.

var isup = require('isup');

var url = 'github.com';

isup(url)
    .then(function(result) {
        var upOrDown = result === true ? 'up' : 'down';
        console.log(url + ' is ' + upOrDown);
    })
    .catch(function(error) {
        console.error(error.toString());
    });

Enjoy!

About

Check if a website is up or down - https://www.npmjs.com/package/isup

License:MIT License


Languages

Language:JavaScript 100.0%