diff options
author | Melody Horn <melody@boringcactus.com> | 2021-11-12 22:38:39 -0700 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2021-11-12 22:38:39 -0700 |
commit | f79b75710167088e2031a82a94a8d127fbb16a1f (patch) | |
tree | ffbbd167c34864d92b1d1e0a3b40da77e0b06874 /tests/config-example/narchttpd.rhai | |
parent | fad6b7b755b788ca0d9113999faa8fb0d6f89ad0 (diff) | |
download | narchttpd-f79b75710167088e2031a82a94a8d127fbb16a1f.tar.gz narchttpd-f79b75710167088e2031a82a94a8d127fbb16a1f.zip |
god is dead and we have killed him.
Diffstat (limited to 'tests/config-example/narchttpd.rhai')
-rw-r--r-- | tests/config-example/narchttpd.rhai | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/tests/config-example/narchttpd.rhai b/tests/config-example/narchttpd.rhai index c876bc1..7c9185d 100644 --- a/tests/config-example/narchttpd.rhai +++ b/tests/config-example/narchttpd.rhai @@ -1,17 +1,20 @@ http_ports = [1337]; https_ports = []; -domain(["domain.test", "alternate-domain.test"], serve_static(#{ +let sample = serve_static(#{ root: "./domain.test", -})); -domain("sub.domain.test", serve_static(#{ +}); +domains["domain.test"] = sample; +domains["alternate-domain.test"] = sample; +domains["sub.domain.test"] = serve_static(#{ root: "./sub.domain.test", -})); -domain("dynamic.test", proxy_child(#{ - command: |port| "python -m http.server " + port, +}); +domains["dynamic.test"] = proxy_child(#{ + command: "python -m http.server 6970", in_dir: "./dynamic.test", -})); -domain("function.test", |request| #{ + port: 6970, +}); +domains["function.test"] = |request| #{ status: 200, body: "OK", -}); +}; |