I am trying to build a demo web application to show the real time results of an IoT sensor. I would like to be able to give my audience a URL which they can all type into their laptops / phones, and then see the real time data from the sensor. I am comfortable with the sensor side code and able to build a http POST or GET to the server. I have also implemented some basic tutorials getting real time connection between the server and client (using server side events).
My plan was that the client side of this app would open an EventListener to the server. On the server this would then make use of an SQL event (npm mysql-event) to refresh data whenever the database changed. But I am not sure how to get data from the POST (or GET) into the same global database - it seems that the default is that every client is seeing a different database. Is that right, or am I missing something ? thanks for any help ! Stephen