Simple web server that handles one HTTP request at a time. Handles the messages for 200, 304, 400, 404, and 408. A multi-threaded web server is also avaliable to handle multiple requests simultaneously
- Download and install Python 3.9.
- Git clone this repo
https://github.com/Tooo/Web-Server.git- In webserver.py, fill in your server's host and port.
SERVER_HOST = '0.0.0.0'
SERVER_PORT = 8080- Run webserver.py.
python3 webserver.py- Open the URL on your browser with your server's host and port.
<SERVER_HOST>:<SERVER_PORT>- In multi_webserver.py, fill in your server's host and port.
SERVER_HOST = '0.0.0.0'
SERVER_PORT = 8080- Run multi_webserver.py.
python3 multi_webserver.py- Open the URL on your browser with your server's host and port.
<SERVER_HOST>:<SERVER_PORT>| Code | Message |
|---|---|
| 200 | OK |
| 304 | Not Modified |
| 400 | Bad Request |
| 404 | Not Found |
| 408 | Request Timed Out |
- Install python package requests.
pip install requests- Run multi_webserver.py
python3 multi_webserver.py- Run test_multithreaded.py located in the tests directory
python3 test_multithreaded.py