A fast, minimalist HTTP server for serving static content.
## Run server listening on port 3000, serving locally from "./local/www".
dk run stevenxie/junior -p 3000:80 -v ./local/www:/www/
Download executable from releases, then run:
## Run HTTP server on port 4200, serving from "/var/www".
./junior -p 4200 --root /var/www
## For more details:
./junior --help
junior
uses valyala/fasthttp
behind
the scenes to give itself that extra edge, and is bootstrapped with
urfave/cli
.
The Docker image stevenxie/junior
features a version of junior
automatically built with Travis and compressed using
UPX to keep it extra light.
I made junior
because I wanted a really fast, lightweight way of running
a static site behind the traefik
reverse proxy.
I had tried lighttpd
, but it proved to be
difficult to configure without trailing slashes, and although it was small, it
still felt too complicated and bloated for my use case.
So, I set out to build a custom solution, and this is the result of that: