kc-cluster
v1.0.5
Published
[nodejs] Cluster process
Downloads
6
Readme
Cluster
[nodejs] Cluster process
Install
npm install kc-cluster
Use
var cluster = require('kc-cluster')(4);
process.title = 'App';
if (cluster.isMaster) {
console.log(`[${process.pid}] ${process.title} - master`);
}
if (cluster.isWorker) {
console.log(`[${process.pid}] ${process.title} - slave`);
}