var app = express();
var server = http.createServer(app);
+var io = require('socket.io')(server, {
+ serveClient: (config.env === 'production') ? false : true,
+ path: '/socket.io-client'
+});
+
+io.adapter(redis({
+ host: config.ip,
+ port: 6379
+}));
+
+require('./config/socketio')(io, require('./services/dashboard')(io));
+
if (!sticky.listen(server, config.port)) {
// Master code
server.once('listening', function() {
} else {
// Slave code
- var io = require('socket.io')(server, {
- serveClient: (config.env === 'production') ? false : true,
- path: '/socket.io-client'
- });
-
- io.adapter(redis({
- host: config.ip,
- port: 6379
- }));
- require('./config/socketio')(io, require('./services/dashboard')(io));
require('./config/express')(app);
require('./routes')(app, ami);
}