[Vuejs]-How to render a graph when Mysql data is updated in Vue?

0👍

What you could do is using socket.io for this. The moment you update your database in Node.js you then also send a notification or the data over a socket, which tells your Vue.js application that it needs to load new data or gives it the data directly.

I used the following npm packages for my setup with Vue.js and Node.js:

 Vue: socket.io-client  
 Node: socket.io

I followed these 2 sites when I faced a similar problem to get a hang of sockets:
https://socket.io/get-started/chat/#Introduction
https://medium.com/@jaouad_45834/basic-chat-web-app-using-express-js-vue-js-socket-io-429588e841f0

Leave a comment