根据 chat 示例创建 game-server,支持分布式部署、域名访问、数据库连接和基础使用
This commit is contained in:
45
game-server/config/servers_multi_ser.ts
Normal file
45
game-server/config/servers_multi_ser.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
module.exports = {
|
||||
'development': {
|
||||
'connector': [
|
||||
{
|
||||
'id': 'connector-server-1',
|
||||
// 'host': '127.0.0.1',
|
||||
'host': '39.101.222.20',
|
||||
'port': 4050,
|
||||
'clientHost': '39.101.222.20',
|
||||
'clientPort': 3050,
|
||||
'frontend': true,
|
||||
'args': '--inspect=10001'
|
||||
}
|
||||
],
|
||||
'chat': [
|
||||
{'id': 'chat-server-1', 'host': '39.101.222.20', 'port': 6050, 'args': '--inspect=10002'},
|
||||
{'id': 'chat-server-2', 'host': '39.100.68.60', 'port': 6051, 'args': '--inspect=10004'},
|
||||
{'id': 'chat-server-3', 'host': '39.100.68.60', 'port': 6052, 'args': '--inspect=10005'}
|
||||
],
|
||||
'gate': [
|
||||
{
|
||||
'id': 'gate-server-1',
|
||||
'host': '39.101.222.20',
|
||||
'clientPort': 3014,
|
||||
'frontend': true,
|
||||
'args': '--inspect=10003'
|
||||
}
|
||||
]
|
||||
},
|
||||
'production': {
|
||||
'connector': [
|
||||
{'id': 'connector-server-1', 'host': '127.0.0.1', 'port': 4050, 'clientPort': 3050, 'frontend': true},
|
||||
{'id': 'connector-server-2', 'host': '127.0.0.1', 'port': 4051, 'clientPort': 3051, 'frontend': true},
|
||||
{'id': 'connector-server-3', 'host': '127.0.0.1', 'port': 4052, 'clientPort': 3052, 'frontend': true}
|
||||
],
|
||||
'chat': [
|
||||
{'id': 'chat-server-1', 'host': '127.0.0.1', 'port': 6050},
|
||||
{'id': 'chat-server-2', 'host': '127.0.0.1', 'port': 6051},
|
||||
{'id': 'chat-server-3', 'host': '39.100.68.60', 'port': 6052}
|
||||
],
|
||||
'gate': [
|
||||
{'id': 'gate-server-1', 'host': '127.0.0.1', 'clientPort': 3014, 'frontend': true}
|
||||
]
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user