This is basically trying to fetch a few web pages to test if we have a valid internet connection. It takes a rather naive approach of validation. It was originally created for educational purposes.
To run the tool just run from the command line:
$ npm start
If you have a valid internet connection you would see:
๐ถ Testing whether we have internet connection ๐ถ
โช โ
tested https://twitter.com and it's upโ
โช โ
tested https://facebook.com and it's upโ
โช โ
tested https://reddit.com and it's upโ
๐ All urls seem to be alive, we are good to go!
If there is a problem with at least one of the URLs:
๐ถ Testing whether we have internet connection ๐ถ
โช โ
tested https://facebook.com and it's upโ
โช โ
tested https://twitter.com and it's upโ
โช โ tested https://reddit2.com and it's down ๐ค
โน ๏ธ It seems there is kind of an issue ...