github.com/jeremyje/gowebserver/cert

A simple, convenient, reliable, well tested HTTP/HTTPS web server to host static files.


Keywords
http, https, webserver
License
Apache-2.0
Install
go get github.com/jeremyje/gowebserver/cert

Documentation

Go Web Server

A simple, convenient, reliable, well tested HTTP/HTTPS web server to host static files. It can host a local directory or contents of a zip file.

# Host the directory you're currently in.
gowebserver

# Host your home directory.
gowebserver --directory=${HOME}

# Host a zip file from the internet.
gowebserver --directory=https://github.com/jeremyje/gowebserver/archive/v1.5.zip

Features

  • Zero-config required, hosts on port 80 or 8080 based on root and supports Cloud9's $PORT variable.
  • HTTP and HTTPs serving
  • Automatic HTTPs certificate generation
  • Optional configuration by flags or YAML config file.
  • Host static files from:
    • Local directory (current directory is default)
    • ZIP archive (local or from HTTP/HTTPS)
    • Tarball (.tar, .tar.gz, .tar.bz2) archive
  • Metrics export to Prometheus.
  • Prebuild binaries for all major OSes.
  • Ubuntu snappy packaging for Raspberry Pi and other IoT devices.

Downloads

OS    | Arch  | Link

----------|-------|------------------------------------------------------------------------------------------- Linux | amd64 | curl -O -L https://github.com/jeremyje/gowebserver/releases/download/v1.6/server-amd64 Linux | arm | curl -O -L https://github.com/jeremyje/gowebserver/releases/download/v1.6/server-arm Linux | 386 | curl -O -L https://github.com/jeremyje/gowebserver/releases/download/v1.6/server-386 Windows | amd64 | curl -O -L https://github.com/jeremyje/gowebserver/releases/download/v1.6/server-amd64.exe Windows | 386 | curl -O -L https://github.com/jeremyje/gowebserver/releases/download/v1.6/server-386.exe

Build

Status: Build Status Go Report Card

Install Go 1.5+.

git clone git@github.com:jeremyje/gowebserver.git --recursive
make

OR

go build gowebserver

Test

make test
make bench