Blocking websites with Node.js on a MAC and Windows inside an Electron.js application

preview_player
Показать описание
Blocking websites on a Mac and Windows is surprisingly easy to do, and it is a unified API across all Operating Systems. On each OS there is a file called "hosts", where we have a record for telling our network driver which IP address should be used for specific domain names. That usually helps when we want, for example, test our Web application similar to the production environment, but on our laptops by pointing our main domain name to our local IP address 127.0.0.1 . The actual record looks something like this

....
....

Рекомендации по теме
Комментарии
Автор

is this blocking inside electron app, or external browser?

tashfeenj