I'm a total novice to coding and just can't get my head around the web socket.
I'm sure this is super simple.....
I have connect PLC to node red successfully and have data logging to a mysql database. The next thing I wanted to do is feed the current realtime value to a website. I have a website setup which is hosted on the same server via apache2.
I have tried a couple of examples that create a simple webpage and updates every five seconds etc. I got that working no problem, I think because it is hosted directly from node red web server. I tried to transfer this to my own hosted web page and I can't get it to connect.
After reading more I realised I didn't understand it enough. Am I correct to think that you need a server and a client to pass data? In my instance to I need to setup the node red side as the server and then code at my website site side as the client?
My server is 192.168.1.50 and the website hosted 192.168.1.50/index.html. I don't really understand how to point them to each other to establish a connection.
Node red is hosted 192.168.1.50:1880.
Apologies if this is really simple.....I'm really after understanding should the website be the client and is there some simple code I can implement to get this going.....as a starter.
Thanks for the help,
Ant