command
module
Version:
v0.0.0-...-061cf60
Opens a new window with list of versions in this module.
Published: Aug 11, 2020
License: AGPL-3.0
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Creamy Static
No-fluff pkg/net/http
FileServer wrapper
for serving a local directory on the web
Usage
-
FILE_PATH
: location to load files from, defaults to ./static
(effectively /static
in container)
-
PORT
: port to listen on, defaults to 80
-
WATERMARK
: text to show on HTML pages as a watermark, disabled by default
-
BASIC_AUTH_USERNAME
: enable basic auth with this username
-
BASIC_AUTH_PASSWORD
: enable basic auth with this password
With Docker
docker run --rm -it \
-p 80:80 \
-v $(pwd)/foo/bar:/static \
-e WATERMARK="creamy-static was here" \
albinodrought/creamy-static
Without Docker
FILE_PATH=./foo/bar \
PORT=80 \
WATERMARK="creamy-static was here" \
./creamy-static
Building
With Docker
docker build -t albinodrought/creamy-static .
Without Docker
go get && go build
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.