httpserv

A tiny, zero-dependency HTTP fileserver, meant for local development of HTML. It's not the absolute fastest, it's not the absolute smallest executable, it's not the most featureful, but it's incredibly simple to deploy and does almost nothing but just serve the file you name over HTTP. Specifically, all it does is:

Because of its simplicity, it's incredibly quick to install, quick to start, and quick to respond

Planned tasks in rough chronological order include:

Planned non-features include:

Install

sh cargo install httpserv

That's it. Assuming the Cargo bin directory is on your path, you can now call httpserv from your command line. For directions on installing Cargo, please see here.

On WSL, you may need to call cargo.exe and httpserv.exe instead, depending on if you've got Rust installed on the Windows or WSL side of things.

Usage

All arguments are optional -- if you want to serve your current directory on localhost:8080 with the default mappings, you can just type httpserv and hit enter. Otherwise:

sh httpserv [directory] [listen] [mappings...]

Known issues

Because this is meant for local development and not production use, there are some issues which I haven't bothered to fix. In general, the reason why boils down to httpserv being meant to aid local development. If you're using it in any situation where you can't restart it at will, you're doing it very, very wrong.