HUB
Sign inSign up
static logo

prologic/static

By prologic

•Updated over 3 years ago

static is a simple static web server

Image
0

823

prologic/static repository overview

⁠static - a simple static web server

Build Status Go Report Card Go Reference

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⁠

Tag summary

Content type

Image

Digest

sha256:43a39a1db…

Size

6.2 MB

Last updated

over 3 years ago

docker pull prologic/static