3 Star 2 Fork 4

陈煜 / ym-gameserver

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
app.js 507 Bytes
一键复制 编辑 原始数据 按行查看 历史
陈煜 提交于 2018-11-01 12:30 . 1
// const cluster = require('cluster');
// const numCPUs = require('os').cpus().length;
const { spawn } = require('child_process');
const config=require('./config');
for(let i=0;i<config.dockers.length;i++){
const ls = spawn('node',['fork/docker',`${config.dockers[i].ip}`,`${config.dockers[i].port}`,`${config.dockers[i].type}`]);
ls.stdout.on('data', (data) => {
console.log(`stdout: ${data}`);
});
ls.stderr.on('data', (data) => {
console.log(`stderr: ${data}`);
});
}
NodeJS
1
https://gitee.com/yuguo138/ym-gameserver.git
git@gitee.com:yuguo138/ym-gameserver.git
yuguo138
ym-gameserver
ym-gameserver
master

搜索帮助