aboutsummaryrefslogtreecommitdiff
path: root/src/config.hpp
diff options
context:
space:
mode:
authorMetroWind <chris.corsair@gmail.com>2025-09-07 09:42:33 -0700
committerMetroWind <chris.corsair@gmail.com>2025-09-07 09:42:33 -0700
commitea0d3220db995018335c48eb06b9794235ff436b (patch)
tree892564cdd4946c6ee9c1051bc31ff5c7bba6ddf1 /src/config.hpp
Initial commit, mostly just copied from shrt.
Diffstat (limited to 'src/config.hpp')
-rw-r--r--src/config.hpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/config.hpp b/src/config.hpp
new file mode 100644
index 0000000..1f4e01f
--- /dev/null
+++ b/src/config.hpp
@@ -0,0 +1,23 @@
1#pragma once
2
3#include <filesystem>
4#include <string>
5
6#include <mw/error.hpp>
7
8struct Configuration
9{
10 std::string listen_address = "localhost";
11 // Set this to 0 to listen to socket file.
12 int listen_port = 8123;
13 std::string socket_user = "";
14 std::string socket_group = "";
15 int socket_permission = 0;
16 std::string base_url = "http://localhost:8123/";
17 std::string data_dir = ".";
18 std::string openid_url_prefix;
19 std::string client_id;
20 std::string client_secret;
21
22 static mw::E<Configuration> fromYaml(const std::filesystem::path& path);
23};