I’ve been using Java Processing for some while, now tried the p5.js examples on Windows and RPi.
I’d like to be able to make a p5.js application on the RPi that auto-runs separately from the IDE, has a static url (not random :8xxx port), and comms to a backend. For the comms to backend I keep finding mention of websockets and node.js, but no simple get-going guide.
One issue I have, is that the sketch examples refer to the host as localhost or 127.0.0.1 which is all good while everything is on one PC. Now I have server on RPi and web-page on PC or phone I put the server’s current IP address in the code. Is there a way for the web-page to get the server’s IP address?