目标:在简单的部署基础上,进一步提升需求,新用户注册,在数据表user中添加一条数据。
一、在数据库中新建一个table ,命名为user。
二、公共文件和配置文件,一些会被引用的组件
修改shared里面mysql配置文件,之后再game-server/app/dao下配置好dao-pool.js和mysql.js。
修改servers.json
{
"development":{
"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}
],
"area":[
{"id":"area-server-1", "host":"127.0.0.1", "port":3160},
{"id":"area-server-2", "host":"127.0.0.1", "port":3161},
],
"auth":[
{"id":"auth-server-1", "host":"127.0.0.1","port":3170}
],
"gate":[
{"id": "gate-server-1", "host": "127.0.0.1", "clientPort": 3014, "frontend": true}
]
},
"production":{
"connector":[
{"id":