diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-07-19 11:46:25 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-07-19 13:29:39 +0300 |
commit | 62b3cd170e603367629f7b1dc2abd02a9524277a (patch) | |
tree | 09bd5c29fc486e990773dfc29f79ac261ce7807c /ewww.md | |
parent | ee3c218fea70d02d0bc0e1e4baae8cb8c988074c (diff) | |
download | ewww-62b3cd170e603367629f7b1dc2abd02a9524277a.tar.gz |
feat: serve files from configured webroot
Diffstat (limited to 'ewww.md')
-rw-r--r-- | ewww.md | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -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 ~~~ |