cluster-node
v0.0.1
Published
Very basic clustering simplicity for express apps
Downloads
5
Readme
cluster-node
Very simple clustering wrapper for nodejs
// app.js
require('cluster-node')(workers=4);
if(cluster.isWorker){
var express = require('express'),
app = express(),
server = require('http').createServer(app)
server.listen(3000, function() {
//console.log('Server listening on 3000');
} );
app.all('*', function(q,s,n){
s.end('Hi world - served by process '+cluster.worker.id);
})
}