From 3b83159707622ed6881c01db63a48137b9b56a31 Mon Sep 17 00:00:00 2001 From: adjoly Date: Mon, 17 Mar 2025 12:01:30 +0100 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=F0=9F=8F=97=EF=B8=8F=E3=80=8D=20wip:?= =?UTF-8?q?=20Added=20example=20of=20config=20file=20need=20review=20&&=20?= =?UTF-8?q?added=20tomlpp=20to=20./lib=20in=20submodule?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitmodules | 3 +++ exemples/test.toml | 21 +++++++++++++++++++++ lib/tomlpp | 1 + 3 files changed, 25 insertions(+) create mode 100644 .gitmodules create mode 100644 exemples/test.toml create mode 160000 lib/tomlpp diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..228b417 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "lib/tomlpp"] + path = lib/tomlpp + url = https://github.com/keyzox71/tomlpp diff --git a/exemples/test.toml b/exemples/test.toml new file mode 100644 index 0000000..0c3b0ff --- /dev/null +++ b/exemples/test.toml @@ -0,0 +1,21 @@ +[server] +server_names = { "localhost", "2B5.local" } # can be a array or a str +port = { 8080, 8090 } # can be a array or a int + +root = "/nfs/adjoly/workspace/kanel.ovh" +max_post_size = "10M" + +cookies = true +uploads = false +dirlist = true + +methods = {"GET", "POST", "DELETE"} +index = "index.html" + +[server.error_page] +404 = "not_found.html" +401 = "unauthorized.html" +402 = "uwu.html" + +[server.cgi] +py = "/usr/bin/python3" diff --git a/lib/tomlpp b/lib/tomlpp new file mode 160000 index 0000000..05777d6 --- /dev/null +++ b/lib/tomlpp @@ -0,0 +1 @@ +Subproject commit 05777d656d0b0f499dc3ddf1e3a9b18eb819ada5