A very simple implementation of a multi-thread static webserver using HTTP over TCP. The main goal here is to practice the learnings from the book The Rust Programing Language, chapter 20: Final Project: Building a Multithreaded Web Server.
You'll need to install Rust and Cargo (rust package manager)
- Cargo (Linux and MacOS)
$ curl https://sh.rustup.rs -sSf | sh
- Clone the repo
- Run the server
cargo run
- Open your browser
- Use one tab to access http://127.0.0.1:7878/sleep, which will open a slow page (10 seconds sleeping thread).
- Use another tab to access http://127.0.0.1:7878/, which will open a quick page (no sleep).