How to detect MySQL changes in NodeJS?

5

Good evening,

Has anyone used this package or do you know of a similar one that works?

Link: link

  • Purpose: to launch an event when there is a change in the database. Before I gave an error saying that it was not allowed to monitor my binlog, I set it and it does not make any more mistakes, but it does not work.
  • My log file is: C: / xampp / mysql / data

    
asked by anonymous 29.06.2016 / 23:28

1 answer

0

In my opinion, your application has this responsive routine, that is, doing something automatically when any action occurs. Correct?

If your web server supports it, I suggest you use WebSocket to do exactly what you need.

The client, connecting to your application will create a persistent connection , which will exist while it is logged in. This way, you can respond from the server to a certain (or multiple) client whenever the routine you expect is executed.

You can also use Spring-WebSocket to make it easier to implement. You can also use some APIs such as SocketJS or Socket.io in Javascript.

Hug.

  

The Spring Framework provides a WebSocket API designed to adapt to   various WebSocket engines. Currently the list includes WebSocket   runtimes such as Tomcat 7.0.47+, Jetty 9.1+, GlassFish 4.1+, WebLogic   12.1.3+, and Undertow 1.0+ (and WildFly 8.0+). Additional support may be added as more WebSocket runtimes become available.

Sources:

08.09.2016 / 18:44