You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
![]()
continuous-integration/drone/push Build is passing
Details
|
2 months ago | |
---|---|---|
.dockerfiles | 3 months ago | |
.vscode | 2 months ago | |
cmd/static | 2 months ago | |
scripts | 6 years ago | |
tools | 3 years ago | |
.drone.yml | 2 months ago | |
.gitignore | 3 months ago | |
.goreleaser.yml | 2 years ago | |
Dockerfile | 3 months ago | |
LICENSE | 5 months ago | |
Makefile | 3 months ago | |
README.md | 3 months ago | |
doc.go | 3 months ago | |
go.mod | 3 months ago | |
go.sum | 2 months ago | |
handlers.go | 2 months ago | |
preflight.sh | 3 months ago | |
router.go | 3 months ago | |
server.go | 2 months ago | |
version.go | 3 months ago |
README.md
static - a simple static web server
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.
Installation
Source
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
Usage
Run static:
static
Then visit: http://localhost:8000/
Configuration
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
License
static
is licensed under the terms of the MIC License