September 2014
Intermediate to advanced
316 pages
7h 6m
English
We have built many little Socket.IO demonstration applications, and now is the time to create the Socket.IO we are going to use. We only need to update the authorization and connection functions. Let's get started. Open up index.js present in the socket.io folder and make the following changes to the require statements at the top:
var io = require('socket.io'), cookie = require('cookie'), cookieParser = require('cookie-parser'), expressSession = require('express-session'), ConnectRedis = require('connect-redis')(expressSession), redisAdapter = require('socket.io-redis'), redis = require('redis'), config = require('../config'), redisSession = new ConnectRedis({host: config.redisHost, port: config.redisPort}), redisChat = require('../redis/chat'), ...Read now
Unlock full access