import { testCallback } from "./biz/member/cost";
import { initActivity } from "./biz/member/msgActivity";
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";
import { getEdition } from "./tools/system";

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("ef48bd04cce245fb26cc5e52362fe144")
    // await getUnitData();
    // await changeDB();
    // await getData();
    // await outPutMember();
    // await test();
}

lanuch();



