forked from NetEase/pomelo
-
Notifications
You must be signed in to change notification settings - Fork 1
如何添加新的服务器类型
Million edited this page Sep 29, 2015
·
5 revisions
######1、配置adminServer.json,添加serverType
[{
"type": "connector",
"token": "agarxhqb98rpajloaxn34ga8xrunpagkjwlaw3ruxnpaagl29w4rxn"
}]
######2、创建app/servers/{serverType}目录,pomelo会去自动读取此目录下的handler、remote、cron等目录,处理相应功能。
######3、servers.json中添加指定的serverType配置
{
"development": {
"connector": [{
"id": "connector-server-1",
"host": "127.0.0.1",
"port": 3150,
"clientHost": "127.0.0.1",
"clientPort": 3010,
"frontend": true
}]
},
"production": {
"connector": [{
"id": "connector-server-1",
"host": "127.0.0.1",
"port": 3150,
"clientHost": "127.0.0.1",
"clientPort": 3010,
"frontend": true
}]
}
}