Prueba de que es posible realizar un servidor HTTP en python, sin utilizar Apache, Nginx o similares.
Sólamente utilizando un script de python, que incluye las librerías BaseHTTPRequestHandler
y HTTPServer
Para correrlo, crear la base de datos correspondiente adjunta, y correr el script así
./server.py
o python server.py
Nota: Requiere de Python3
Ejemplo de funcionamiento:
./server.py
Starting httpd...
# en esta parte se realiza un request a la dirección 127.0.0.1:8080 en el navegador
127.0.0.1 - - [27/Apr/2021 22:59:19] "GET / HTTP/1.1" 200 -
# Respuesta en el navegador
[{"id": 1, "nombre": "TEST"}, {"id": 2, "nombre": "Otro Test"}]