
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, dataInit0817 } from "./biz/dataInt";
import { getDataOut, getGuiYuOut } from "./biz/dataOut";
import { homePageStatisChanLiang } from "./biz/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 homePageStatisChanLiang(1);
    // await dataInit();
    await getDataOut();
    // await dataInit0508();
    // await dataInit0508();
    // await yjDataInit0508();
    // await dataInit0516();
    // await dataInit0522();
    // await dataInit0604();
    // await dataInit0618();
    await dataInit0817();

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

lanuch();