No description
![]() * actix-web 1.0.0 brought some changes in how associated data is accessed, and how handlers are written. * static files are now a separate crate `actix-files`. * web::run now creates the App and the Server and runs the server. they really want to have HttpServer::new and App::new in the same scope (I couldn't find a proper signature for the create_app function) * replace .trim_right_matches (depreceated in rust 1.33) with .trim_end_matches https://github.com/actix/actix-web/blob/web-v1.0.0/MIGRATION.md |
||
---|---|---|
src | ||
.gitignore | ||
.travis.yml | ||
Cargo.toml | ||
LICENSE | ||
README.md |
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
- fancier directory listing
- 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.will see.
Release builds
cargo build --release
strip --strip-unneeded ./target/release/http-server