Basic-http-server, a simple HTTP file server built on Rotor

Published 2016-01-18 under
  • stack
  • static-sver
Posted on Rust Users Forum by Brian Anderson (brson) :

While working on the docs I wanted to be able to serve them quickly, but didn't have a Rust-based tool for it, so I wrote basic-http-server as an excuse to play with rotor. It serves static files out of the current directory over HTTP.

Here is it's --help output.

   basic-http-server [FLAGS] [OPTIONS] [ARGS]

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

OPTIONS: -a, --addr <ADDR> Sets the IP:PORT combination (default "")

ARGS: ROOT Sets the root dir (default ".")

The source is simple and thoroughly commented.

I've had difficulty measuring how fast it is. When I measure with wrk the results seem good, but with ab all requests timeout. I suspect that's a bug in rotor-http, but don't know.

cc @tailhook