Check if EPFL is down.
Install this globally and you'll have access to the is-epfl-down
command
anywhere on your system.
npm i is-epfl-down -g
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
-v
, --version
Print is-epfl-down
's version.
-h
, --help
Print is-epfl-down
command line 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.
-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.
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
npm i is-epfl-down --save
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
});
Returns a Promise with a boolean as parameter.
Type: array
A list of subdomains from EPFL or urls.
Type: object
Any of the following options.
Type: number
Milliseconds to wait for a server to send response headers before aborting request.
Contributions are always welcome.
See Contributing.
Apache License 2.0
Original work (c) ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2017-2018.
Modified work (c) William Belle, 2018-2023.
See the LICENSE file for more details.