aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/config-example/narchttpd.rhai16
-rw-r--r--tests/config-example/narchttpd.toml20
2 files changed, 20 insertions, 16 deletions
diff --git a/tests/config-example/narchttpd.rhai b/tests/config-example/narchttpd.rhai
deleted file mode 100644
index 713dc3e..0000000
--- a/tests/config-example/narchttpd.rhai
+++ /dev/null
@@ -1,16 +0,0 @@
-http_ports = [1337];
-https_ports = [];
-
-let sample = serve_static(#{
- root: "./domain.test",
-});
-domains["domain.test"] = sample;
-domains["alternate-domain.test"] = sample;
-domains["sub.domain.test"] = serve_static(#{
- root: "./sub.domain.test",
-});
-domains["dynamic.test"] = proxy_child(#{
- command: "python -m http.server 6970",
- in_dir: "./dynamic.test",
- port: 6970,
-});
diff --git a/tests/config-example/narchttpd.toml b/tests/config-example/narchttpd.toml
new file mode 100644
index 0000000..a5876c6
--- /dev/null
+++ b/tests/config-example/narchttpd.toml
@@ -0,0 +1,20 @@
+http_ports = [1337]
+https_ports = []
+
+["domain.test"]
+mode = "static"
+root = "./domain.test"
+
+["alternate-domain.test"]
+mode = "static"
+root = "./domain.test"
+
+["sub.domain.test"]
+mode = "static"
+root = "./sub.domain.test"
+
+["dynamic.test"]
+mode = "proxy-child"
+command = "python -m http.server 6970"
+in_dir = "./dynamic.test"
+port = 6970