express.oi
Advanced tools
Comparing version 0.0.12 to 0.0.13
'use strict'; | ||
var http = require('http'); | ||
var https = require('https'); | ||
var _ = require('lodash'); | ||
var async = require('async'); | ||
var express = require('express'); | ||
var expressLayer = require('express/lib/router/layer'); | ||
var socketSession = require('./session'); | ||
var expressSession = require('express-session'); | ||
var io = require('socket.io'); | ||
var http = require('http'); | ||
var https = require('https'); | ||
var async = require('async'); | ||
var _ = require('underscore'); | ||
var IoRequest = require('./request'); | ||
var IoResponse = require('./response'); | ||
var socketSession = require('./session'); | ||
delete express.session; | ||
express.session = require('express-session'); | ||
express.session = expressSession; | ||
express.io = io; | ||
@@ -47,11 +50,4 @@ | ||
express.application.io = function(options) { | ||
options = options || {}; | ||
_.defaults(options, { | ||
log: false | ||
}); | ||
this.io = io.listen(this.server, options); | ||
this.io.router = {}; | ||
// this.io.middleware = []; | ||
@@ -79,3 +75,2 @@ this.io.route = function(route, next, res) { | ||
this.io.session = function(options) { | ||
_.defaults(options, { | ||
@@ -92,9 +87,2 @@ name: options.key || 'connect.sid', | ||
// this.io.use = (function(this) { | ||
// return function(callback) { | ||
// return this.io.middleware.push(callback); | ||
// }; | ||
// })(this); | ||
this.io.on('connection', function(socket) { | ||
@@ -101,0 +89,0 @@ return initRoutes(socket, this.io); |
{ | ||
"name": "express.oi", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"description": "Realtime-web library, based on express and socket.io", | ||
@@ -9,2 +9,3 @@ "keywords": [ | ||
"framework", | ||
"express.oi", | ||
"express.io", | ||
@@ -15,3 +16,3 @@ "express", | ||
], | ||
"homepage": "https://github.com/sibartlett/express.io", | ||
"homepage": "https://github.com/sibartlett/express.oi", | ||
"author": "Simon Bartlett <simon@sibartlett.com>", | ||
@@ -22,9 +23,9 @@ "repository": "git://github.com/sibartlett/express.oi", | ||
"async": "^0.9.0", | ||
"cookie-parser": "^1.3.3", | ||
"express": "^4.11.2", | ||
"express-session": "^1.10.2", | ||
"socket.io": "^1.3.2", | ||
"underscore": "^1.7.0" | ||
"cookie-parser": "^1.3.4", | ||
"express": "^4.12.2", | ||
"express-session": "^1.10.3", | ||
"lodash": "^3.4.0", | ||
"socket.io": "^1.3.5" | ||
}, | ||
"main": "lib/index.js" | ||
} |
@@ -43,2 +43,6 @@ ![express.oi](http://i.imgur.com/zzZLudd.png) | ||
}); | ||
app.http().io(); | ||
app.listen(3000); | ||
``` | ||
@@ -45,0 +49,0 @@ |
144
11196
8
222
+ Addedlodash@^3.4.0
+ Addedlodash@3.10.1(transitive)
- Removedunderscore@^1.7.0
- Removedunderscore@1.13.7(transitive)
Updatedcookie-parser@^1.3.4
Updatedexpress@^4.12.2
Updatedexpress-session@^1.10.3
Updatedsocket.io@^1.3.5