added CORS

This commit is contained in:
2026-02-16 23:24:31 +01:00
parent 14b8234e77
commit 58d37b51b7
27 changed files with 80 additions and 32 deletions

21
source/json_settings.h Normal file
View File

@@ -0,0 +1,21 @@
#ifndef JSON_SETTINGS_H
#define JSON_SETTINGS_H
#include "json.hpp"
#include <string>
namespace AppSettings {
static constexpr char settingsFile[] = "assets/settings.json";
struct Settings {
int http_port;
std::string db_path;
std::string url;
};
Settings load();
Settings deafult();
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Settings, http_port, db_path, url);
}
#endif // JSON_SETTINGS_H