Skip to content

vasigorc/udemy_server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learn Rust by Building Real Applications

This is the walkthrough of this Udemy course + a couple of post-course exercises (refer to Devoir section).

Runbook

To run this server:

  1. Make sure that you have Rust installed (using rustup is probably best)

  2. Run this command from the root of the project

      PUBLIC_PATH=$(pwd)/public cargo run
  3. Open up your favorite browser and hit enter for this address http://127.0.0.1:8080/

Devoir

  • 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 and HttpResponse
  • Use Tokio library + native async/ to convert the single core server into an async multithreaded server

Running tests with output

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