
import moment = require("moment");
import { initActivity } from "./biz/member/msgActivity";
import { createOrder } from "./biz/member/order";
import { initAdmin } from "./biz/member/rightsMgmt";
import { t } from "./biz/provide";
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 { test } from "./httpTOhttps";
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("服务初始化成功");
    
}

lanuch();

