21 lines
405 B
C++
21 lines
405 B
C++
#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 domain;
|
|
};
|
|
|
|
Settings load();
|
|
Settings deafult();
|
|
|
|
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Settings, http_port, db_path, domain);
|
|
}
|
|
#endif // JSON_SETTINGS_H
|