main.cc 448 B

1234567891011121314151617
  1. #include <drogon/drogon.h>
  2. #include "Util/logger.h"
  3. #if defined(ENABLE_MYSQL)
  4. #include "Util/SqlPool.h"
  5. #endif
  6. using namespace std;
  7. using namespace toolkit;
  8. int main() {
  9. //初始化日志
  10. Logger::Instance().add(std::make_shared<ConsoleChannel> ());
  11. //Load config file
  12. drogon::app().loadConfigFile("../config.json");
  13. //Run HTTP framework,the method will block in the internal event loop
  14. drogon::app().run();
  15. return 0;
  16. }