#pragma once #include #include #include #include struct IPConnection { std::string address; int port; }; struct UnixConnection { std::string unix; }; struct RedisConfig { std::variant connection_method; std::optional username; std::optional password; }; struct Config { std::string bind_host = "127.0.0.1"; int bind_port = 8080; std::optional canonical_origin; std::optional redis_config; }; extern Config config; void load_config(const char* path); void from_json(const nlohmann::json& j, Config& conf);