An http
file server written in rust using tokio and
hyper.
Bash the following commands:
git clone https://github.com/herebythere/file_server
cargo install --path file_server
Bash the following command to serve files in the cwd
at localhost:3000
:
file_server localhost:3000
Open a browser and visit http://localhost:3000
.
A common expectation of file servers is to serve encoded files when requested.
File_server
expects encoded files to exist alongside their unencoded counterparts.
If a request has a content-encoding
header:
Content-Encoding: gzip;
File-server
will serve the gzip
-ed version of a requested file if available.
Otherwise it will serve the default file.
Encoded files will not be served if their unencoded counterpart does not exist.
BSD 3-Clause License