Send data from browser to OF app

I have a page served from my godaddy host that is using chromes speech recognition toolkit. I want this to send messages to an OF app running on someone’s computer.

The workflow would be they open the webpage in chrome and then open the OF app running on the same computer, as the webpage detects speech it sends this to the app.

Any ideas on how to do this? Do I need to set up websockets on the server and then have this send to the local computer? Or is there a simpler way.
thanks in advance.

I’ve done something like this, however, I wasn’t using Chrome or a browser. It was set up as a node js server talking to a web API and communicating to oF through OSC - maybe that’s a route that’s possible to take? To be fair I don’t remember the details of how it was set up as the web side of things was handled by someone else, but apparently it wasn’t too hard to set up.

I guess the easiest is to implement a websocket server in your oF app and then connect to it from your web app. Or you can use mqtt, there is an ofxMqtt addon. Then you would also have to run a broker. If you have docker running on your machine then you could start it with the following command.
docker run -ti -p 1883:1883 -p 9001:9001 toke/mosquitto

let me know if there are any questions.

You might check out the post examples in ofxHTTP

You might also check out

Both have web / OF app communication examples.

thanks guys, i’ll check out those suggestions.