Simple, secure and modern HTTP server to serve a static site, single-page app or a file with ease
552
srv is a simple, secure and modern HTTP server, written in Go, to serve a static site, single-page application or a file with ease. You can use it through its command-line interface, Docker image or programmatically. As it's an http.Handler implementation, it should be easy to integrate it into your application. The following key features make srv unique and differentiable from the existing solutions and the http.FileServer implementation.
The following Dockerfile shows how to use the provided base image to serve a static site, single-page application or file through a running Docker container. By default, the base image will serve all files available in the /var/www/ directory and listen for TCP connections on 8080.
FROM kevinpollet/srv:latest
COPY . /var/www/
Then, you can build and run your Docker image with the following commands. Your static site or files will be available on http://localhost:8080.
docker build . -t moby:latest
docker run -d -p 8080:8080 moby:latest
Content type
Image
Digest
Size
7.8 MB
Last updated
almost 5 years ago
docker pull kevinpollet/srv