Make sure that you have cargo
and rustc
installed in your computer
Run cargo build --release
at the cmd to build an executable
Run .\target\release\http-server.exe
to start the server
Access http://<you_local_address>:7878
to see the index page
To download a file, access the endpoint
/file
. Example:/file/filename.ext/p=<password>
This project was only tested on Windows 10.
- 200 Ok
- 400 Bad Request
- 404 Not Found
-
https://doc.rust-lang.org/book/ch20-03-graceful-shutdown-and-cleanup.html
-
Lots of research to improve even more