0

I'm using the Python built-in web server to host my javascript web pages for testing purposes:

python3 -m http.server

When I browse to http://localhost:8000, I'm presented with the default "Directory listing" view, with blinding white background (in my otherwise dark-themed computing environment).

Is there an easy way to make the Python web server have a dark theme for Directory pages? (I'm trying to avoid writing a custom web server in Python, I'm hoping it looks for a config file of some sort that I could just add to my code folders).

Jeremy
  • 1,021
  • 9
  • 8
  • I'd say you subclass `SimpleHTTPRequestHandler` with your desired changes and then re-implement the code from [this line](https://github.com/python/cpython/blob/0aa3b9d76c036fd306c0fd1c270d5d88d02962a1/Lib/http/server.py#L1273) downwards to use it. – Klaus D. Aug 09 '23 at 05:25

0 Answers0