Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

is-epfl-down

innovativeinnovation209Apache-2.07.0.2

Check if EPFL is down

EPFL, down, check, up, status

readme

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.

changelog

Changelog

v7.0.2 / 2022-07-28

  • Test against Node.js 18
  • Update dependencies

v7.0.1 / 2022-03-03

  • Test against Node.js 17
  • Update dependencies
  • Remove infowww.epfl.ch and menus.epfl.ch from subdomains

v7.0.0 / 2021-06-04

  • Drop support for Node.js < 12
  • Test against Node.js 16
  • Update dependencies

v6.1.0 / 2021-03-22

  • Update dependencies
  • Migrate from Travis CI to GitHub Actions
  • Remove badge dependencies
  • Remove InForm (inform.epfl.ch) from subdomains
  • Replace myvm.epfl.ch with portal-xaas in subdomains

v6.0.4 / 2020-11-20

  • Update dependencies
  • Migrate travis-ci.org to .com

v6.0.3 / 2020-10-22

  • Update dependencies
  • Test against Node.js 15

v6.0.2 / 2020-04-23

  • Update dependencies
  • Test against Node.js 14

v6.0.1 / 2020-03-24

  • Update dependencies
  • Remove wordpress.epfl.ch, blog.epfl.ch and wikis.epfl.ch

v6.0.0 / 2020-01-03

  • Drop support for Node < 10
  • Update dependencies
  • Test against Node.js 13

v5.0.1 / 2019-10-03

  • Update dependencies

v5.0.0 / 2019-07-18

  • Change HTTP method from HEAD to GET
  • Update dependencies

v4.3.1 / 2019-05-02

  • Update dependencies
  • Remove .eslintignore
  • Test against Node.js 12

v4.3.0 / 2019-04-08

  • Set user-agent
  • Remove mobile (m.epfl.ch) from subdomains

v4.2.0 / 2019-04-06

  • Add more domain to test
  • Remove EPFL TV and homepage from subdomains
  • Remove useless option -?
  • Improve README.md documentation API
  • Move from istanbul to nyc for code coverage
  • Update dev dependencies

v4.1.3 / 2019-02-28

  • Update dependencies
  • Test against Node.js 11
  • Clean README.md

v4.1.2 / 2018-10-25

  • Remove bottin.epfl.ch
  • Move external documentation to README.md
  • Update copyright (transfer from EPFL DevRun)

v4.1.1 / 2018-09-20

  • Update dependencies

v4.1.0 / 2018-09-07

  • Clean subdomains list
  • Clean contributing
  • Update dependencies

v4.0.0 / 2018-08-08

  • Drop support for Node < 8
  • Update dependencies
  • Set 1234.epfl.ch and myjob.epfl.ch to https

v3.0.0 / 2018-05-17

  • Drop support for Node < 6
  • Rewrite code
  • Move to david-dm (watching deps)
  • Update dependencies
  • Fix mocha globals (console.log in tests)

v2.3.0 / 2018-04-26

  • Add native notification (cli argument --notify)
  • Improve command line usage
  • Update dependencies

v2.2.0 / 2018-04-04

  • Add more domain to test
  • Move to eslint

v2.1.0 / 2018-03-29

  • Add cli argument --quiet
  • Disable package-lock.json
  • Update dependencies
  • Improve README.md
  • Fix integration tests

v2.0.2 / 2018-02-13

  • Add more domain to test
  • Remove short, git and svn services
  • Clean usage text
  • Update copyright

v2.0.1 / 2018-01-23

  • Update dependencies

v2.0.0 / 2017-12-07

  • [Breaking change] - Use HTTPS for protocol-less URLs (previously it defaulted to http).
  • Add check of specific urls
  • Update dependencies

v1.1.1 / 2017-09-27

  • Update dependencies

v1.1.0 / 2017-09-01

  • Set user agent string DevRunBot

v1.0.6 / 2017-08-23

  • Add more domain to test
  • Fix no sound on Linux (process.exit)

v1.0.5 / 2017-08-09

  • Add a lot more domain to test
  • Update dev dependencies
  • Explicitly exit when isDown equals true

v1.0.4 / 2017-07-21

  • Add more domain to test
  • Update dependencies

v1.0.3 / 2017-07-02

  • Add more domain to test
  • Improve cli informations with examples
  • Update logo (darker red)

v1.0.2 / 2017-06-25

  • Add more domain to test
  • Update dependencies

v1.0.1 / 2017-05-30

  • Update dependencies

v1.0.0 / 2017-05-12

  • Add cli argument --alarm
  • Add more domain to test
  • Add documentation link
  • Improve tests

v0.5.0 / 2017-05-04

  • Add cli argument --timeout
  • Update yargs dependency

v0.4.0 / 2017-04-29

  • Rewrite package with cli + module
  • Add coverage badge
  • Add more domain to test
  • Handle short grouped argument
  • Update dependencies

v0.3.0 / 2017-04-25

  • Add cli argument --version
  • Handle short cli arguments
  • Set timeout to 7 seconds with 0 retry

v0.2.0 / 2017-04-21

  • Add cli argument --config
  • Improve logo

v0.1.1 / 2017-04-20

  • Add more domain to test

v0.1.0 / 2017-04-18

  • Play alarm sound if a subdomain is down
  • Clean copyright

v0.0.5 / 2017-04-13

  • Add more domain to test
  • Update contributing guide

v0.0.4 / 2017-03-30

  • Add cli argument --faculties and --officials

v0.0.3 / 2017-03-30

  • Add cli argument --main and --services
  • Add more services to check
  • Add dependencies status badge

v0.0.2 / 2017-03-26

  • Add more domain to test

v0.0.1 / 2017-03-25

  • First version, released on an unsuspecting world.