vendredi 29 mai 2020

VERY simple HTTP Server on Pi

I'm still new to Pi And Python - so forgive what might be a silly question. I need to set up a very simple HTTP Server - that can be accessed from the internet. I don't need the complexity of Apache or anything like that.

After much reading - so far I can use python -m http.server --cgiwhich will let me run a python program from the web. Great.

The problem is this is slow as the program has to load, do what it does, and then send it. I have found other examples that wrap http.server within the python program - but they all say localhost only.

What do I need to do to manage a simple 'GET' request from within python - that can can be accessed from the Pis IP address?

Thanks - fortunately I have plenty of hair to pull out at the moment. :-)




Aucun commentaire:

Enregistrer un commentaire