Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Simple wrapper for nodejs cluster
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
README.md
index.js
package.json

README.md

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);
                })
}
Something went wrong with that request. Please try again.