This project is a lightweight, multi-threaded HTTP/1.1 server implemented in Python using only the standard library. It serves static HTML, text, and image files from a themed resources/ directory and supports JSON file uploads. The server handles multiple client connections concurrently using a configurable thread pool and includes basic security features like path traversal protection, host header validation, and MIME type enforcement.
- Python 3.7 or higher
- No external libraries required (only Python standard library)
-
Clone or download the repository.
-
Ensure the
resourcesdirectory exists in the project root. This folder contains themed resources such as HTML pages, text files, and images (e.g.,ae_86_front.png,ae_86_interior.jpg). -
Start the server:
python server.py # Defaults: host=127.0.0.1, port=8080, max_threads=10