MAJ pour upgrade pc backup
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
#include "Configuration.hpp"
|
||||
|
||||
namespace Setup {
|
||||
ServerConfiguration Configuration::serverConfig;
|
||||
|
||||
void Configuration::init(std::string configuration)
|
||||
{
|
||||
//todo
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
#ifndef CONFIGURATION_HPP
|
||||
#define CONFIGURATION_HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace Setup {
|
||||
|
||||
constexpr const char* getDefaultConfigurationPath() {return "configuration.json"; };
|
||||
|
||||
struct ServerConfiguration
|
||||
{
|
||||
unsigned int port = 5000;
|
||||
std::string url = "0.0.0.0";
|
||||
};
|
||||
|
||||
class Configuration
|
||||
{
|
||||
private:
|
||||
static ServerConfiguration serverConfig;
|
||||
public:
|
||||
Configuration() = delete;
|
||||
static const ServerConfiguration& server() {return serverConfig;};
|
||||
static void init(std::string configuration = getDefaultConfigurationPath());
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user