static is a simple static web server which does nothing more than just serve up static files with a configured root path. It also supports Single-Page-App (SPA) mode and CORS as well as configurable index files.
With a valid Go environment:
go install go.mills.io/static/cmd/static@latest
Or build from source:
git clone https://git.mills.io/prologic/static.git
cd static
make install
Run static:
static
Then visit: http://localhost:8000/
By default static services up files from the current directory. This can be
configured via the -r/--root option. For a full list of options see --help:
$ ./static -h
Usage: ./static [options] [file]
-b, --bind string [int]:<port> to bind to (default "0.0.0.0:8000")
-d, --debug enable debug logging
-i, --index strings default index file to serve (default [index.html])
-n, --no-dir disable directory listing
-r, --root string path to serve (default "/Users/prologic/Projects/static")
-s, --spa enable single-page (SPA) mode
-v, --version display version information
pflag: help requested
static is licensed under the terms of the MIC License
Content type
Image
Digest
sha256:43a39a1db…
Size
6.2 MB
Last updated
over 3 years ago
docker pull prologic/static