Py-Ser is a lightweight and simple HTTP server implemented in Python. It provides functionalities for handling HTTP requests, including serving static files, echoing content, and capturing user-agent information.
- File Serving: Serve static files from a specified directory.
- Echo Endpoint: Echo the content specified in the URL.
- User-Agent Endpoint: Mine blocks with proof-of-work and validate transactions for added security.
- State Tracking: Retrieve and display the User-Agent information from the HTTP headers.
Python 3.x No additional dependencies
Clone the repository:
-
Clone the repository:
git clone https://github.com/your-username/Py-Ser.git cd Py-Ser
-
Run the server:
python main.py --directory /path/to/serve
Replace /path/to/serve with the directory you want to serve.
Once the server is running, you can access different endpoints:
Hello World:
http://localhost:4221/
Echo Endpoints:
http://localhost:4221/](http://localhost:4221/echo/your_content_here
User-Agent Endpoint:
http://localhost:4221/user-agent
File Serving:
http://localhost:4221/your_file_name
Contributions are welcome! If you have ideas for improvements, new features, or bug fixes, please open an issue or submit a pull request.