/** * @en this file is used for pm2 deploy, and also for server cluster config. * @zh 此文件既用于 pm2 部署,也用于服务器集群配置。 */ module.exports = { globalVars: { /** * @en tick timeout of the connection, in ms. * @zh 连接超时时间,单位毫秒。 */ connectionTickTimeout: 30000, /** * @en key usd for token signature verification * @zh TOKEN 签名验证密钥 */ secretKey: 'do not forget to change this', /** * @en the database type, default is kvdb * @zh 数据库类型 //kvdb 或者 mongodb,默认使用 kvdb */ dbType: 'mongodb', /** * @en mongodb config, if dbType is kvdb, then ignore * @zh mongodb 配置,如果 dbType 为 kvdb,则忽略 */ mongodb: { usr:'', pwd:'', host:'150.158.100.241', port: 27017, db: 'tgx-squid' } }, apps: [ { name: 'squid-server-1', script: 'ServerApp.js', env: { /** 本地测试环境配置 */ ip: '127.0.0.1', port: 8092, /** 线上环境配置 */ // ip: '150.158.100.241', // port: 8092, gameTypes: 'billiards,gomoku,tank,kingtd,arean', // publicUrl: 'wss://squidgameserver.gryphon.fun', /** * @en http port, used for internal service. * @zh HTTP 端口,用于内网通信服务。 */ httpPort: 40001, /** * @en whether to enable Master service. There is only one Master service in the cluster. * @zh 是否开启 Master 服务,整个集群只有一个。 */ enableMasterService: true, /** * @en whether to enable Match service. There is only one Match service in the cluster. * @zh 是否开启 Match 服务,整个集群只有一个。 */ enableMatchService: true, } }, // { // name: 'game-server-2', // script: 'ServerApp.js', // env: { // ip: '127.0.0.1', // port: 3002, // gameTypes: 'billiards,gomoku,tank,kingtd', // // publicUrl: 'wss://127.0.0.1:3202', // httpPort: 40001, // enableMasterService: false, // enableMatchService: false, // } // }, ] };