You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
#pragma once
|
|
|
|
|
#include <data.hpp>
|
|
|
|
|
#include <json.hpp>
|
|
|
|
|
#include <web_server.hpp>
|
|
|
|
|
|
|
|
|
|
class Application {
|
|
|
|
|
with_data_directory data_directory;
|
|
|
|
|
|
|
|
|
|
HttpServer http_server;
|
|
|
|
|
|
|
|
|
|
static void web_server_started(std::size_t port);
|
|
|
|
|
static void secure_web_server_started(std::size_t port);
|
|
|
|
|
Application() = delete;
|
|
|
|
|
Application(const json &cfg);
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
std::shared_ptr<HttpsServer> https_server = nullptr;
|
|
|
|
|
|
|
|
|
|
static Application &get(const json &config);
|
|
|
|
|
int run();
|
|
|
|
|
};
|