cluster-node

Very basic clustering simplicity for express apps

npm install cluster-node
4 downloads in the last month

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);
                })
}
npm loves you