import { changeDB, getMailData, getData, getUnitData } from "./biz/cleanData";
import { sendMail } from "./biz/mail";
import { testCallback } from "./biz/member/cost";
import { initActivity } from "./biz/member/msgActivity";
import { initSaveUnsubmitted } from "./biz/register";
import { initSMS } from "./biz/sms";
import { initSystemTask } from "./biz/task";
import { initConfig, systemConfig} from "./config/serverConfig";
import { initDataBaseModel } from "./data/db/db";
import { httpServer } from "./net/http_server";

async function lanuch() {
    /**初始化配置解析 */
    await initConfig();
    /**初始化数据库 */
    await initDataBaseModel();
    /**创建http服务 */
    httpServer.createServer(systemConfig.port);
    console.log('This indicates that the server is started successfully.');
    await initSMS();
    // await initAdmin();
    await initSystemTask();
    await initActivity();
    // await initSaveUnsubmitted();

    // await test1();
    // await inputData();  20240520日导入数据
    // await t();
    // await test();
    // console.log(moment(1498262400000).format("YYYY-MM-DD HH:mm:SS"))
    console.log("服务初始化成功");
    // await sendMail("18711017326@163.com");
    // await testCallback("e793d4b37c2eac2de13b4df69fa2cc18")
    // await getUnitData();
    // await changeDB();
}

lanuch();

