Skip to content

Commit

Permalink
Updated package.json and made cluster available
Browse files Browse the repository at this point in the history
  • Loading branch information
kristjanmik committed Sep 5, 2013
1 parent 1d122db commit 4868be9
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
20 changes: 20 additions & 0 deletions clusterserver.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//A plugin to manage our cluster, e.g. multiple running instances of same server
var clusterMaster = require("cluster-master");

var options = {
exec: "./server.js",
size: require('os').cpus().length, //How many do we want?
silent: false, //Stout for each process to the master
signals: false, //Bind system signals SIGINT, SIGKILL...
onMessage: function (msg) {
console.error("Message from %s %j", this.uniqueID, msg)
}
}

//Start up the cluster
clusterMaster(options);

//About to exit the master process, kill the cluster
process.on('exit', function() {
clusterMaster.quit();
});
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,18 @@
}
],
"dependencies": {
"request": "2.11.x",
"jquery": "1.8.x",
"scraper": "0.0.9",
"moment": "2.0.0",
"file": "0.1.x",
"xml2js": "0.2.x",
"mocha": "~1.8.2",
"cheerio": "0.10.x",
"file": "~0.2.1",
"isn2wgs": "0.0.1",
"underscore": "~1.5.1",
"express": "~3.3.8"
"moment": "~2.1.0",
"xml2js": "~0.2.8",
"express": "~3.3.8",
"cheerio": "~0.12.2",
"request": "~2.27.0",
"mocha": "~1.12.1",
"scraper": "0.0.9",
"jquery": "~1.8.3",
"cluster-master": "~0.1.2"
},
"scripts": {
"test": "node_modules/mocha/bin/mocha test/integration"
Expand Down

0 comments on commit 4868be9

Please sign in to comment.