blob: 1bd5184c2c458b1fd11408b2b925db04970bb775 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
const cluster = require('cluster');
global.mpws = require('./server/version');
if (cluster.isMaster) {
console.log("")
console.log("Minteck Satellite Server");
console.log("version " + mpws.version);
console.log("");
console.log("Copyright (c) " + mpws.copyright + " Minteck");
console.log("All Rights Reserved");
console.log("");
for (let i = 0; i < require('os').cpus().length; i++) {
cluster.fork();
}
cluster.on('exit', (worker, code, signal) => {
console.log("[" + worker.id + "] " + "Process " + worker.process.pid + " died");
cluster.fork();
});
} else {
require('./server/core');
}
|