diff --git a/GlosSITarget/HttpServer.cpp b/GlosSITarget/HttpServer.cpp index f9c3424..85466e1 100644 --- a/GlosSITarget/HttpServer.cpp +++ b/GlosSITarget/HttpServer.cpp @@ -19,9 +19,11 @@ limitations under the License. #include #include "AppLauncher.h" +#include "Settings.h" HttpServer::HttpServer(AppLauncher& app_launcher) : app_launcher_(app_launcher) -{} +{ +} void HttpServer::run() { @@ -30,6 +32,10 @@ void HttpServer::run() res.set_content(j.dump(), "text/json"); }); + server_.Get("/settings", [this](const httplib::Request& req, httplib::Response& res) { + res.set_content(Settings::toJson().dump(), "text/json"); + }); + server_thread_ = std::thread([this]() { if (!server_.listen("0.0.0.0", port_)) { spdlog::error("Couldn't start http-server");