/*
 * @Author: error: git config user.name && git config user.email & please set dead value or install git
 * @Date: 2022-07-10 16:35:47
 * @LastEditors: lishengyin
 * @LastEditTime: 2022-08-04 15:08:37
 * @FilePath: /gsd/main.cc
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#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> ());

    //Set HTTP listener address and port
    drogon::app().addListener("0.0.0.0",9080);
    //Load config file
    #ifndef RELEASE
        drogon::app().loadConfigFile("../config.json");
    #else
        drogon::app().loadConfigFile("../config/config.json");
    #endif
    //Run HTTP framework,the method will block in the internal event loop
    drogon::app().run();
    
    return 0;
}
