内存同步数据版的共斗框架

This commit is contained in:
liangtongchuan
2020-09-08 19:59:19 +08:00
parent 2298f36f02
commit de563792cc
12 changed files with 280 additions and 12 deletions
+3 -1
View File
@@ -39,7 +39,7 @@ adminfilePath.ADMIN_USER = 'config/adminUser';
preload();
// 创建 mongodb 连接
mongoose.connect('mongodb://root:zyz_2020@dds-8vbdb47c6fb58a541.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vbdb47c6fb58a542.mongodb.zhangbei.rds.aliyuncs.com:3717/admin?replicaSet=mgset-500808098', (err) => {
mongoose.connect('mongodb://root:zyz_2020@dds-8vbdb47c6fb58a541.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vbdb47c6fb58a542.mongodb.zhangbei.rds.aliyuncs.com:3717/admin?replicaSet=mgset-500808098', { useNewUrlParser: true, useUnifiedTopology: true }, (err) => {
if (err) {
console.log('mongodb connect err', err);
} else {
@@ -140,6 +140,7 @@ app.configure('production|development', function () {
// route configures
app.route('chat', routeUtil.chat);
app.route('battle', routeUtil.battle);
// filter configures
app.filter(new pinus.filters.timeout());
@@ -162,6 +163,7 @@ app.configure('production|development', function () {
app.configure('development', function () {
// enable the system monitor modules
app.enable('systemMonitor');
app.enable('rpcDebugLog');
});
if (app.isMaster()) {