example/index.js
function (services, callback) {
          var http = require('http');
          var app = require('express')();
          var server = http.createServer(app);

          // get remote services
          //var fakedb1 = services[0];
          //var fakedb2 = services[1];

          // all express-related stuff goes here, e.g.
          app.use(function (req, res) { res.end('Handled by PID = ' + process.pid); });

          // all socket.io stuff goes here
          //var io = require('socket.io')(server);

          // don't do server.listen(...)!
          // just pass the server instance to the final async's callback
          callback(null, server);
        }
function (services, callback) {
          var http = require('http');
          var app = require('express')();
          var server = http.createServer(app);

          // get remote services
          //var fakedb1 = services[0];
          //var fakedb2 = services[1];

          // all express-related stuff goes here, e.g.
          app.use(function (req, res) { res.end('Handled by PID = ' + process.pid); });

          // all socket.io stuff goes here
          //var io = require('socket.io')(server);

          // don't do server.listen(...)!
          // just pass the server instance to the final async's callback
          callback(null, server);
        }
function ( services , callback ) { var http = require ( 'http' ) ; var app = require ( 'express' ) ( ) ; var server = http . createServer ( app ) ; // get remote services //var fakedb1 = services[0]; //var fakedb2 = services[1]; // all express-related stuff goes here, e.g. app . use ( function ( req , res ) { res . end ( 'Handled by PID = ' + process . pid ) ; } ) ; // all socket.io stuff goes here //var io = require('socket.io')(server); // don't do server.listen(...)! // just pass the server instance to the final async's callback callback ( null , server ) ; }
configure the worker
configure the worker