• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.circleci/H23-Dec-2018-3736

.github/H23-Dec-2018-43

man/H23-Dec-2018-4744

src/github.com/nbari/www/H03-May-2022-

vendor/golang.org/x/crypto/H03-May-2022-84,69267,202

.gitignoreH A D23-Dec-201865 87

.travis.ymlH A D23-Dec-2018526 2620

CHANGELOG.mdH A D23-Dec-2018106 32

CONTRIBUTING.mdH A D23-Dec-20182.7 KiB7748

DockerfileH A D23-Dec-20181.8 KiB6361

Gopkg.lockH A D23-Dec-2018529 2117

Gopkg.tomlH A D23-Dec-2018722 3531

LICENSEH A D23-Dec-20181.4 KiB2822

MakefileH A D23-Dec-20182.1 KiB6753

README.mdH A D23-Dec-20181.6 KiB6232

www.goH A D23-Dec-20182.8 KiB9890

www_test.goH A D23-Dec-20181.4 KiB6041

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