I'm starting playing with NodeJS
and Socket.IO
and I've got a question regarding communication between pages of my application.
I've got a Node JS script (get_new_data)
which is periodicaly executed using a cron task. This script will get information through Internet, parse them and write them in a PG Database. This is ok.
I've got a secondary script (show_last_data)
using Node/Express/Socket.io
that displays the last information of the DB when it is executed. This is also ok, right now.
What I would like now, is that the script show_last_data
would be notified when new data are inserted in the database and the corresponding display divs to be updated.
Can get_new_data
connect to show_last_data
even if it is not the server that produces the page ? Or should I manage this in another way ?
Thanks for help