I'm wondering how to let the frontend know when there is a change on the backend. How is this handled? I can think of two possibilities and maybe neither is quite right. I'm making an application in azure. The first option is to simply write the change to the database on the backend and every time the API is called, ask if there is a change and then maybe log the user out on frontend. The second option I can think of is via signalr for example? Is either of those paths good or is there a better one?
1 Answer
I recommend you to use SignalR, if you want Listen for BackEnd events in FrontEnd, sockets are the best option. it will prevent you from making manual API calls.
this link has an example of SignalR with Angular using ASPNET Core: https://code-maze.com/netcore-signalr-angular-realtime-charts/
2 Comments
pietro
Thank you for response. Ok i ill try signalr. And my app is runing in Azure. Azure has something named web hooks. Do you know this one? Maybe it's something we could use
Jesus Alfredo Diaz Osuna
Do not know him