aboutsummaryrefslogtreecommitdiff
path: root/tests/config-example/narchttpd.rhai
blob: 7c9185d1e156e346ec58bd9049c6c60ea6683e6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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,
});
domains["function.test"] = |request| #{
    status: 200,
    body: "OK",
};