
import { initConfig, systemConfig } from "./config/serverConfig";
import { httpServer } from "./net/http_server";
import { initDB } from "./db/dbInit";
import { dataInit0516, dataInit, dataInit0508, yjDataInit0508, dataInit0522, dataInit0604, dataInit0609, dataInit0618 } from "./biz/dataInt";
import { getDataOut, getGuiYuOut } from "./biz/dataOut";
import { homePageStatisChanLiangWithYear, homePageStatisXiaoShou } from "./biz/xcx/user";
import { getPwdMd5, md5PwdStr } from "./tools/system";

async function lanuch() {
    /**初始化配置解析 */
    await initConfig();
    
    /**初始化数据库 */
    await initDB();
    /**创建http服务 */
    httpServer.createServer(systemConfig.port);
    console.log('This indicates that the server is started successfully.');
 
    // await homePageStatisXiaoShou(1, 2025);
    // await homePageStatisChanLiangWithYear(2025, 1);
    // await dataInit();
    await getDataOut();
    // await dataInit0508();
    // await dataInit0508();
    // await yjDataInit0508();
    // await dataInit0516();
    // await dataInit0522();
    // await dataInit0604();
    // await dataInit0618();

    // let checkPwd = getPwdMd5("18120935727", md5PwdStr("123456"))
    console.log();
}

lanuch();