diff --git a/CMakeLists.txt b/CMakeLists.txt index 6151495..d159d3e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,8 @@ set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED True) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g") +# + include_directories(wormhole ${LIBMICROHTTPD_INCLUDE_DIRS} ${YAML_CPP_INCLUDE_DIRS} diff --git a/src/logger.cpp b/src/logger.cpp index 710af77..4d26d9c 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -72,7 +72,7 @@ void Logger::Logger::log(std::string message, Level level) Logger::Logger& Logger::instance() { - if (inst_setup) + if (!inst_setup) { inst.set_log_hook([](const Log& log) { std::cout << log << std::endl; diff --git a/src/main.cpp b/src/main.cpp index a6d1bd2..738527c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -30,10 +30,9 @@ void start_wormhole() using namespace std::string_literals; std::unique_ptr server = - std::make_unique(4000); + std::make_unique(8000); server->map_routes({ - { {HTTP::Request::Type::GET, "/test"}, [](const HTTP::RequestArgs_t& arg){ return HTTP::Response{"Hello, browser!"}; } }, @@ -46,6 +45,7 @@ void start_wormhole() server->start(); Logger::instance() << "Loading config"; + getchar(); }