31 lines
830 B
TypeScript
31 lines
830 B
TypeScript
import { extendType } from './extends';
|
|
import { ctor } from './global';
|
|
import { initGcType } from './jsonType';
|
|
import { createLng } from './lng';
|
|
import { initMongoDB } from './setMongodb';
|
|
import { initStarupFun } from './starup';
|
|
|
|
// todo 本地创建数据库索引文件,线上勿用(创建索引和配置增加活动与项目分离)
|
|
|
|
async function start() {
|
|
//定义全局变量
|
|
ctor();
|
|
// 创建跨服索引(默认本服)
|
|
// G.argv.serverType = "cross"
|
|
//连接mongodb
|
|
await initMongoDB();
|
|
await initStarupFun.initStart()
|
|
//创建语言包
|
|
await createLng();
|
|
|
|
console.log('等待一会后结束程序');
|
|
setTimeout(function() {
|
|
console.log('结束程序');
|
|
process.exit();
|
|
}, 5000); // 等待5秒后结束程序
|
|
}
|
|
|
|
//启动服务
|
|
start();
|
|
|