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

Published 18 Jan 2016 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]

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

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

   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