adafruit / Adafruit_CircuitPython_WSGI

WSGI library for simple web servers
MIT License
20 stars 18 forks source link

Move esp32spi_wsgi server code to here #20

Closed FoamyGuy closed 1 year ago

FoamyGuy commented 1 year ago

This change is to go along with: https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI/pull/167/

This moves the esp32spi_wsgiserver code that had resided in that library over to here. In #167 it is slated for removal from that library due to having non-standard socket behavior and causing many other libraries to then need logic for handling different sockets types.

This proposal would move it to here, so that this library can still exist and be functional. This class was modified minimally in order to integrate it with the more standardized socket behavior that #167 will bring.

I tested the simpletest script on a PyPortal Titano successfully but haven't done any testing beyond that.

FoamyGuy commented 1 year ago

The latest commit adds back the example that includes static files, which used to be located in the esp32spi library as well.

I have tested successfully the simpletest and the serving of static files from the new example on a PyPortal 8.2.0

I think this is ready for review