1234567891011121314151617 |
- #include <drogon/drogon.h>
- #include "Util/logger.h"
- #if defined(ENABLE_MYSQL)
- #include "Util/SqlPool.h"
- #endif
- using namespace std;
- using namespace toolkit;
- int main() {
- //初始化日志
- Logger::Instance().add(std::make_shared<ConsoleChannel> ());
- //Load config file
- drogon::app().loadConfigFile("../config.json");
- //Run HTTP framework,the method will block in the internal event loop
- drogon::app().run();
- return 0;
- }
|