My application uses the Gin Web Framework for various tasks, one of which is serving static files (Vue.js). In regular intervals calls get made to this API which then updates the data in the DB. This data gets displayed through those static files. My current workaround is setting a timer function in the Vue.js part which refreshes the page every minute.
Is there any more elegant way to immediately refresh those static files as soon as the API makes a change to the DB? Or am I maybe approaching this in a completely wrong way?