import { clusterMain } from './clusterUtils'; import { extendType } from './extends'; import { ctor } from './global'; import { initGcType } from './jsonType'; import { createLng } from './lng'; import { createHttp } from './setHttp'; import { initMongoDB } from './setMongodb'; import { initRedis } from './setRedis'; import { startAfter } from './setStartAfther'; import { createWs } from './setWs'; async function start() { //扩展框架 extendType(); //游戏配置提示文件 initGcType(); //连接mongodb await initMongoDB(); //连接redis await initRedis(); //socket await createWs(); //http await createHttp(); //集群处理 await clusterMain(); //服务器启动后 startAfter(); } //定义全局变量 ctor(); //启动服务 start(); //创建语言包 createLng();