Code Monkey home page Code Monkey logo

statiks's Introduction

Statiks

Fast, zero-configuration, static HTTP filer server. Like Python's SimpleHTTPServer but scalable.

GitHub Releases GoDoc Go Report Card Build Status codecov Mentioned in Awesome Go

Features

  • HTTP and HTTPS (TLS/SSL)
  • Support directory list
  • Cache control and "Last-Modified"
  • Delay response
  • CORS support
  • Content compression (gzip)
  • Request logging

Installation

Via Binaries

Via Homebrew (macOS)

brew tap janiltonmaciel/homebrew-tap
brew install statiks

Via Docker

The official janilton/statiks image is available on Docker Hub.

docker container run -p 9080:9080 -v .:/var/www --rm janilton/statiks

Volume dir: /var/www

Expose port: 9080

Use

statiks [options] <path>

OPTIONS:
  --host value, -h value  host address to bind to (default: "0.0.0.0") [$HOST]
  --port value, -p value  port number (default: "9080") [$PORT]
  --quiet, -q             enable quiet mode, do not output each incoming request (default: false)
  --add-delay value       add delay to responses (in milliseconds) (default: 0)
  --cache value           set cache time (in seconds) for cache-control max-age header (default: 0)
  --no-index              disable directory listings (default: false)
  --compression           enable gzip compression (default: false)
  --include-hidden        enable hidden files as normal (default: false)
  --cors                  enable CORS allowing all origins with all standard methods with any header and credentials. (default: false)
  --ssl                   enable https (default: false)
  --cert value            path to the ssl cert file (default: "cert.pem")
  --key value             path to the ssl key file (default: "key.pem")
  --help                  show help (default: false)
  --version, -v           print the version (default: false)

<path> defaults to . (relative path to the current directory)

Examples

statiks -port 9000
statiks --cors /home
statiks --host 192.168.1.100 --compression /tmp
statiks --ssl --cert cert.pem --key key.pem
statiks --add-delay 100 /tmp

Credits

statiks's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.