This project implements a simple HTTP server written entirely in Rust.
Features:
- Lightweight: No external dependencies required.
- Customizable: Build upon this foundation for your specific needs.
- Basic Functionality:
- Listens on port 8080.
- Supports GET and POST methods.
- Serves static files (HTML, CSS, JS).
- Echos POST request bodies back for the
/echo
endpoint. - Returns 404 Not Found for missing resources.
Benefits:
- Learn Rust by Example: Understand the fundamentals of building an HTTP server.
- Simple Starting Point: Build upon this codebase for your web applications.
Getting Started:
- Clone the repository:
git clone https://https://github.com/Authtbh/http-from-scratch
- Build the project:
cargo build
- Run the server:
cargo run
This server is intended for educational purposes and is not production-ready.
Further Development:
This implementation provides a basic framework. You can extend it to include features like:
- User authentication and authorization
- Session management
- Routing for complex URLs
- Database integration
Feel free to explore and customize this codebase to suit your requirements!