Node.js listen for database changes in SQL Server

Viewed 868

I would like to create a Node.js server, which listens for CRUD operations on a database table in SQL Server and replies to a client with those changes.

This would be similar to the "subscribe" feature in the node-oracledb driver for Oracle. http://oracle.github.io/node-oracledb/doc/api.html#consubscribe

I have been searching for a few days and haven't found any helpful information.

I believe using socket.io is the solution for communicating between the client and the node.js server.

The part that I need assistance with is the node.js server listening for changes in MS SQL Server.

Thanks in advance.

1 Answers

I don't know if you are still looking for an answer. But Hope this will help anyone who has the same question.

There is an npm package called mysql-events. It will watch for any insert, update, delete event and trigger a callback if there is a change.

Related