is-epfl-down

7.0.2 • Public • Published

Is EPFL Down

Check if EPFL is down.

Build Status Coverage Status Apache License 2.0 NPM Version


Command Line

Install

Install this globally and you'll have access to the is-epfl-down command anywhere on your system.

npm i is-epfl-down -g

Usage

is-epfl-down
Usage: is-epfl-down [options]

Startup options:
  -h, --help     Show help                                             [boolean]
  -v, --version  Show version number                                   [boolean]

Hosts and urls options:
  -c, --config     Test your own list of subdomains or urls             [string]
  -f, --faculties  Test EPFL faculties websites
  -m, --main       Test EPFL main site
  -o, --officials  Test EPFL officials websites
  -s, --services   Test EPFL services
  -t, --timeout    Milliseconds to wait for a server                    [number]

Notifications options:
  -a, --alarm   Override default alarm sound                            [string]
  -n, --notify  Show a native notification            [boolean] [default: false]
  -q, --quiet   No alarm sound                        [boolean] [default: false]

Examples:
  is-epfl-down -m          Test EPFL main site
  is-epfl-down -s -n       Test EPFL services and use native notification
  is-epfl-down -f -t 2000  Test EPFL faculties with a timeout of 2 seconds
Startup options

-v, --version
Print is-epfl-down's version.

-h, --help
Print is-epfl-down command line options.

Hosts and urls options

-c [file], --config=[file]
Test your own list of subdomains or urls. File must be a path to a json file. A json example:

["actu","blogs","memento","wiki","http://www.epfl.ae"]

-f, --faculties
Test EPFL faculties websites.

-m, --main
Test EPFL main site.

-o, --officials
Test EPFL officials websites.

-s, --services
Test EPFL services.

-t [number], --timeout=[number]
Milliseconds to wait for a server to send response headers before aborting request.

Notifications options

-a [file], --alarm=[file]
Override default alarm sound. File must be a path to a mp3 or a wav file.

-n, --notify
Show a native notification.

-q, --quiet
No alarm sound.

Examples

Test the main site:
is-epfl-down -m

Test EPFL services:
is-epfl-down -s

Test your own config:
is-epfl-down --config=/path/to/my/config.json

Test EPFL faculties with a timeout of 2s:
is-epfl-down -f -t 2000

Test EPFL faculties with a specific alarm sound in case of failure:
is-epfl-down -f -a /path/to/my/sound.mp3

API

Install

npm i is-epfl-down --save

Usage

const isEpflDown = require('is-epfl-down');

isEpflDown(['www','actu','blogs','http://www.epfl.ae']).then(function(isDown) {
  console.log(isDown);
  //=> false
});

isEpflDown(['unicorn'], {timeout: 1000}).then(function(isDown) {
  console.log(isDown);
  //=> true
});

isEpflDown(subDomains, [options])

Returns a Promise with a boolean as parameter.

subDomains

Type: array

A list of subdomains from EPFL or urls.

options

Type: object

Any of the following options.

timeout

Type: number

Milliseconds to wait for a server to send response headers before aborting request.

Screenshot

command line screenshot

Contributing

Contributions are always welcome.

See Contributing.

Developers

Contributors

License

Apache License 2.0

Original work (c) ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2017-2018.
Modified work (c) William Belle, 2018-2022.

See the LICENSE file for more details.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 7.0.2
    1
    • latest

Version History

Package Sidebar

Install

npm i is-epfl-down

Weekly Downloads

1

Version

7.0.2

License

Apache-2.0

Unpacked Size

68.9 kB

Total Files

8

Last publish

Collaborators

  • williambelle