What I am trying to achieve is to create script which will read from URL and then use this data to do some manipulations.
In example. This script will run every 5 minutes, load page from somewhere, check if something changed, and if something did change (there is one small particular change I am actually will be looking for, but it doesn't matter, as the idea stays the same), it will send me an alert by email. Question is. Can Node.js handle that?
I can create this script in ruby, or even as shell script, run from crontab on server every N minutes; but I wanted to try out Node.js, and it sounds like I have a good "pet project" to try it on.
Yes. look at the "request" module for node.js. It is basically an http client which you can use from inside your node.js app. See https://github.com/mikeal/request
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With