Pomelo Command

启动命令

$ pomelo start -e development|production

启动时以production产品模式下运行则必须添加--deamon选项以后台守护进程方式运行,否则会出现master、gate等服务器消失的情况。

$ pomelo start -e production --deamon

查看服务器

$ pomelo list -p port
try to connect 127.0.0.1:3005
serverId           serverType pid   rss(M) heapTotal(M) heapUsed(M) uptime(m)
connector-server-1 connector  28728 39.75  21.83        16.50       0.20
gate-server-1      gate       30440 39.65  21.83        16.46       0.20
master-server-1    master     31328 37.82  20.33        14.79       0.21

查看服务器-p端口的port必须是master服务器的端口,必须与config中master的配置保持一致。

$ cat game-server/config/master.json
{
  "development": {
    "id": "master-server-1", "host": "127.0.0.1", "port": 3005
  },
  "production": {
    "id": "master-server-1", "host": "127.0.0.1", "port": 3005
  }
}

关闭项目

$ pomelo stop -h host -P port -u username -p password

pomelo stop中host和port必须和master配置文件保持一致,username和password则必须跟adminUser配置文件保持一致。

$ cat game-server/config/adminUser.json
[
  {
    "id": "user-1",
    "username": "admin",
    "password": "admin",
    "level": 1
  },
  
  {
    "id": "user-2",
    "username": "monitor",
    "password": "monitor",
    "level": 2
  },

  {
    "id": "user-3",
    "username": "test",
    "password": "test",
    "level": 2
  }
]

你可能感兴趣的:(Pomelo Command)