This repository has been archived by the owner on Jun 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathws.html
117 lines (96 loc) · 3.75 KB
/
ws.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html>
<html>
<head>
<title>Caltech Library's Digital Library Development Sandbox</title>
<link rel="stylesheet" href="/css/site.css">
</head>
<body>
<header>
<a href="http://library.caltech.edu"><img src="/assets/liblogo.gif" alt="Caltech Library logo"></a>
</header>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="../">Up</a></li>
<li><a href="./mkrss.html">mkrss</a></li>
<li><a href="./mkpage.html">mkpage</a></li>
<li><a href="./urlencode.html">urlencode</a></li>
<li><a href="./go-template-recipes.html">Go text/template recipes</a></li>
<li><a href="./titleline.html">titleline</a></li>
<li><a href="./mkslides.html">mkslides</a></li>
<li><a href="./slides/three-slides.html">Title Page</a></li>
<li><a href="./slides/presentation.html">What is mkslides?</a></li>
<li><a href="./byline.html">byline</a></li>
<li><a href="./ws.html">ws</a></li>
<li><a href="./frontmatter.html">frontmatter</a></li>
<li><a href="./mkpongo.html">mkpongo</a></li>
<li><a href="./urldecode.html">urldecode</a></li>
<li><a href="./sitemapper.html">sitemapper</a></li>
<li><a href="./reldocpath.html">reldocpath</a></li>
</ul>
</nav>
<section>
<h1>ws</h1>
<h2>USAGE</h2>
<pre><code>ws [OPTIONS] [DOCROOT]
</code></pre>
<h2>SYNOPSIS</h2>
<pre><code> a nimble web server
</code></pre>
<p><em>ws</em> is a command line utility for developing and testing static websites.
It uses Go’s standard http libraries and can supports both http 1 and 2
out of the box. It is intended as a minimal wrapper for Go’s standard
http libraries supporting http/https versions 1 and 2 out of the box.</p>
<h2>CONFIGURATION</h2>
<p><em>ws</em> can be configurated through environment settings. The following are
supported.</p>
<ul>
<li>MKPAGE_URL - sets the URL to listen on (e.g. <a href="http://localhost:8000">http://localhost:8000</a>)</li>
<li>MKPAGE_DOCROOT - sets the document path to use</li>
<li>MKPAGE_SSL_KEY - the path to the SSL key if using https</li>
<li>MKPAGE_SSL_CERT - the path to the SSL cert if using https</li>
</ul>
<h2>OPTIONS</h2>
<pre><code> -acme Enable Let's Encypt ACME TLS support
-c Set the path for the SSL Cert
-cert Set the path for the SSL Cert
-d Set the htdocs path
-docs Set the htdocs path
-h Display this help message
-help Display this help message
-k Set the path for the SSL Key
-key Set the path for the SSL Key
-l Should license info
-license Should license info
-u The protocal and hostname listen for as a URL
-url The protocal and hostname listen for as a URL
-v Should version info
-version Should version info
</code></pre>
<h2>EXAMPLES</h2>
<p>Run web server using the content in the current directory
(assumes the environment variables MKPAGE_DOCROOT are not defined).</p>
<pre><code> ws
</code></pre>
<p>Run web server using a specified directory</p>
<pre><code> ws /www/htdocs
</code></pre>
<p>Running web server using ACME TLS support (i.e. Let’s Encrypt).
Note will only include the hostname as the ACME setup is for
listenning on port 443. This may require privilaged account
and will require that the hostname listed matches the public
DNS for the machine (this is need by the ACME protocol to
issue the cert, see <a href="https://letsencrypt.org">https://letsencrypt.org</a> for details)</p>
<pre><code> ws -acme -url www.example.org /www/htdocs
</code></pre>
</section>
<footer>
<span><h1><A href="http://caltech.edu">Caltech</a></h1></span>
<span>© 2020 <a href="https://www.library.caltech.edu/copyright">Caltech library</a></span>
<address>1200 E California Blvd, Mail Code 1-32, Pasadena, CA 91125-3200</address>
<span>Phone: <a href="tel:+1-626-395-3405">(626)395-3405</a></span>
<span><a href="mailto:[email protected]">Email Us</a></span>
<a class="cl-hide" href="sitemap.xml">Site Map</a>
</footer>
</body>
</html>