This is the walkthrough of this Udemy course + a couple of post-course exercises (refer to Devoir section).
To run this server:
-
Make sure that you have Rust installed (using
rustup
is probably best) -
Run this command from the root of the project
PUBLIC_PATH=$(pwd)/public cargo run
-
Open up your favorite browser and hit enter for this address
http://127.0.0.1:8080/
- Fix a bug where local css file's contents are read into the response header
- Look at parts of the code to make them more FP palletable
- Add HttpHeaders to both
HttpRequest
andHttpResponse
- Use Tokio library + native
async
/ to convert the single core server into an async multithreaded server
To see some println
or eprintln
outputs in your test simply append
--show-output
to your command, e.g.:
cargo test --test parallel_requests -- --show-output