Note: Just for learning purposes, not intended or safe to be used for real web applications.
This repository contains a basic implementation of an HTTP server using Python's socket programming. The server is just capable of handling HTTP GET requests and responding with a simple HTML page. Additionally, it includes basic CORS (Cross-Origin Resource Sharing) support to allow requests from different origins.
- HTTP GET Request Handling: The server processes HTTP GET requests and returns a predefined HTML response, including CSS and JavaScript files.
- Interactive Web Page: Includes a simple interactive web page with a click counter, demonstrating how to serve static files (HTML, CSS, JavaScript) and handle user interactions.
- CORS Support: Implements basic CORS headers to allow cross-origin requests.
- Connection Handling: Manages client connections, receiving requests, and sending responses using Python's low-level socket API.
- Python 3.x installed on your machine.
- Windows OS
python httpserver.py
- Linux or Mac
python3 httpserver.py