Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 1.23 KB

readme.md

File metadata and controls

38 lines (26 loc) · 1.23 KB

Lightweight HTTP Server in Rust

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:

  1. Clone the repository: git clone https://https://github.com/Authtbh/http-from-scratch
  2. Build the project: cargo build
  3. 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!