| 12345678910111213141516171819 |
- #pragma once
- #include <cstdint>
- #include <string>
- #include <nlohmann/json.hpp>
- namespace svapi {
- struct Config {
- std::string logLevel = "info";
- std::string httpBind = "0.0.0.0";
- uint16_t httpPort = 8080;
- std::string dbAddress = "localhost:9004";
- std::string webuiDir = "/usr/share/smartbotic-vectorapi/webui";
- static Config fromJson(const nlohmann::json& j);
- static Config load(const std::string& path); // reads file then fromJson
- };
- } // namespace svapi
|