No description
Find a file
Damjan Georgievski 1a12b3aa30 canonicalized root directory is now also an App state
- used to setup the StaticFiles handler
- also for the .tar file handler

additionally, PathBuf::from_param is used to forbid certain paths, see:
https://actix.rs/api/actix-web/stable/actix_web/dev/trait.FromParam.html
2018-07-22 05:39:32 +02:00
src canonicalized root directory is now also an App state 2018-07-22 05:39:32 +02:00
.gitignore initial idea commited 2018-07-04 13:57:42 +02:00
.travis.yml strip binaries for release deploys 2018-07-21 22:17:19 +02:00
Cargo.toml version 0.5 2018-07-21 19:32:04 +02:00
LICENSE initial idea commited 2018-07-04 13:57:42 +02:00
README.md version 0.5 2018-07-21 19:32:04 +02:00

a simple http server like python -m http.server but:

  • written in rust with actix, should be faster
  • allow concurrency
  • download whole directories in .tar format
  • better auto index
  • maybe announce itself on mDNS (avahi)
USAGE:
    http-server [OPTIONS] [PORT]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
        --bind <ADDRESS>       Specify alternate bind address [default: 0.0.0.0]
        --chdir <DIRECTORY>    Specify directory to server [default: .]

ARGS:
    <PORT>    Specify alternate port [default: 8000]

FAQ

  • Q: why .tar and not .zip? A: you can't stream a zip file efficiently, it needs to seek and write to the beggining of a file.

Release builds

cargo build --release
strip --strip-unneeded ./target/release/http-server