I set up a websocket connection using this example https://ihp.digitallyinduced.com/Guide/websockets.html
Would it be possible to track certain DB tables here as well? Like AutoRefresh is doing for actions. I want to push something over WS when a table is updates/inserted. I understand that is what autorefresh is doing, but i'm trying to use this as a backend to backend communication, and autorefresh seems to require an action
Thanks! I'll check it out :) will update if i make it work!
You can find the DB watcher code for DataSync starting here: https://github.com/digitallyinduced/ihp/blob/master/IHP/DataSync/Controller.hs#L76
You need to do two things:
subscribeJSON(this automatically decodes the response the postgres event as json). https://github.com/digitallyinduced/ihp/blob/master/IHP/DataSync/Controller.hs#L114
Maybe DataSync could be for you? https://ihp.digitallyinduced.com/Guide/realtime-spas.html