Answer the question
In order to leave comments, you need to log in
How to connect the site to the server?
In general, the idea is this:
On the ubuntu server there is a python script waiting for a request to be sent to it.
For example, there is a button on the site, a person clicks on the button and a request flies to the ubuntu server in JSON format, for example, a python script processes this and returns a response.
You need some kind of API with which the site will interact with the ubuntu server.
Please tell me how this can be done?
Answer the question
In order to leave comments, you need to log in
In order not to reinvent the wheel, take something ready-made, well-known and described.
Some protocol like mqtt, for him some open free mqtt broker (mosquitto), some simple python client, he subscribes to the broker's topic and waits.
In principle, inside the bundle of mosquitto and node red (for convenient visual programming of mosquitto) you can also cram the module itself with python code.
And some websocket mqtt library, such as Paho JavaScript Client (I haven't tried it myself, but some people recommend it).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question