summaryrefslogtreecommitdiff
path: root/ewww.md
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-07-19 11:46:25 +0300
committerLars Wirzenius <liw@liw.fi>2020-07-19 13:29:39 +0300
commit62b3cd170e603367629f7b1dc2abd02a9524277a (patch)
tree09bd5c29fc486e990773dfc29f79ac261ce7807c /ewww.md
parentee3c218fea70d02d0bc0e1e4baae8cb8c988074c (diff)
downloadewww-62b3cd170e603367629f7b1dc2abd02a9524277a.tar.gz
feat: serve files from configured webroot
Diffstat (limited to 'ewww.md')
-rw-r--r--ewww.md15
1 files changed, 9 insertions, 6 deletions
diff --git a/ewww.md b/ewww.md
index ed2f663..536510c 100644
--- a/ewww.md
+++ b/ewww.md
@@ -88,13 +88,15 @@ for static content only. Every other method returns an error.
## Minimal smoke test
~~~scenario
+when I create webroot/foo.html with "this is your web page"
given a self-signed certificate as snakeoil.pem, using key snakeoil.key
and a running server using config file minimal.yaml
-when I request GET https://example.com/
+when I request GET https://example.com/foo.html
then I get status code 200
~~~
~~~{#minimal.yaml .file .yaml}
+webroot: webroot
tls_key: snakeoil.key
tls_cert: snakeoil.pem
~~~
@@ -104,12 +106,12 @@ tls_cert: snakeoil.pem
~~~scenario
given a self-signed certificate as snakeoil.pem, using key snakeoil.key
-and a running server using config file smoke.yaml
-when I create webroot/foo with "hello, world"
-and I request GET https://example.com/foo
+when I create webroot/foo.html with "this is your web page"
+given a running server using config file smoke.yaml
+when I request GET https://example.com/foo.html
then I get status code 200
-and header content-type is "text/plain"
-and body is "hello, world\n"
+and header content-type is "text/html"
+and body is "this is your web page"
~~~
~~~scenario-disabled
@@ -145,6 +147,7 @@ scaffolding adds randomly chosen port numbers so that the test can run
without being root.
~~~{#smoke.yaml .file .yaml .numberLines}
+webroot: webroot
tls_cert: snakeoil.pem
tls_key: snakeoil.key
~~~