Skip to content

wolfpup-software/file_server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

file_server

An http file server written in rust using tokio and hyper.

How to use

Install

Bash the following commands:

git clone https://github.com/herebythere/file_server
cargo install --path file_server

Run

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.

Implementation Details

Content-Encoding

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.

Licence

BSD 3-Clause License

Releases

No releases published

Packages

No packages published

Languages