Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
.circleci/ | H | 23-Dec-2018 | - | |||
.github/ | H | 23-Dec-2018 | - | |||
man/ | H | 23-Dec-2018 | - | |||
src/github.com/nbari/www/ | H | 03-May-2022 | - | |||
vendor/golang.org/x/crypto/ | H | 03-May-2022 | - | |||
.gitignore | H A D | 23-Dec-2018 | 65 | |||
.travis.yml | H A D | 23-Dec-2018 | 526 | |||
CHANGELOG.md | H A D | 23-Dec-2018 | 106 | |||
CONTRIBUTING.md | H A D | 23-Dec-2018 | 2.7 KiB | |||
Dockerfile | H A D | 23-Dec-2018 | 1.8 KiB | |||
Gopkg.lock | H A D | 23-Dec-2018 | 529 | |||
Gopkg.toml | H A D | 23-Dec-2018 | 722 | |||
LICENSE | H A D | 23-Dec-2018 | 1.4 KiB | |||
Makefile | H A D | 23-Dec-2018 | 2.1 KiB | |||
README.md | H A D | 23-Dec-2018 | 1.6 KiB | |||
www.go | H A D | 23-Dec-2018 | 2.8 KiB | |||
www_test.go | H A D | 23-Dec-2018 | 1.4 KiB |
README.md
1# www 2 3Static web server 4 5[![CircleCI](https://circleci.com/gh/nbari/www.svg?style=svg)](https://circleci.com/gh/nbari/www) 6[ ![Download](https://api.bintray.com/packages/nbari/www/www/images/download.svg) ](https://dl.bintray.com/nbari/www/) 7[![Go Report Card](https://goreportcard.com/badge/github.com/nbari/www)](https://goreportcard.com/report/github.com/nbari/www) 8 9Linux precompiled binaries 10 11[![deb](https://img.shields.io/badge/deb-packagecloud.io-844fec.svg)](https://packagecloud.io/nbari/www) 12[![rpm](https://img.shields.io/badge/rpm-packagecloud.io-844fec.svg)](https://packagecloud.io/nbari/www) 13 14## Install on mac: 15 16 $ brew tap nbari/homebrew-www 17 18next 19 20 $ brew install www 21 22## Install on FreeBSD: 23 24To install the port: 25 26 $ cd /usr/ports/www/go-www/ && make install clean 27 28To add the package: 29 30 $ pkg install go-www 31 32 33# Why ? 34 35Because of the need to share, test via HTTP the contents of a directory. 36 37 38# How it works 39 40By typing ``www`` will start a web server and use as a document root the 41directory where the command was call, a different document root may be specified 42by using the ``-r`` option, for example: 43 44 $ www -r /tmp 45 46By default **www** listen on port 8000, this can be changed by using the ``-p`` option: 47 48 $ www -p 80 (may need root privilages) 49 50 51If TLS is required use the option `-s` and a domain name, for example: 52 53 $ www -s example.com 54 55This will try to get a valid certificate by using letsencrypt but the port will always be 443 56 57When using the ``-s`` use ``https`` option on the browser. 58 59Example using tls and document root on port 8080: 60 61 $ www -s localhost -r /tmp -p 8080 62