express.oi
Advanced tools
Comparing version 0.0.19 to 0.0.20
@@ -11,2 +11,3 @@ 'use strict'; | ||
var expressSession = require('express-session'); | ||
var SharedSession = require("express-socket.io-session"); | ||
var io = require('socket.io'); | ||
@@ -16,3 +17,2 @@ | ||
var IoResponse = require('./response'); | ||
var socketSession = require('./session'); | ||
@@ -84,4 +84,5 @@ delete express.session; | ||
this.use(express.session(options)); | ||
this.io.use(socketSession(options)); | ||
var session = express.session(options); | ||
this.use(session); | ||
this.io.use(new SharedSession(session,{autoSave:true})); | ||
}.bind(this); | ||
@@ -88,0 +89,0 @@ |
@@ -12,8 +12,8 @@ 'use strict'; | ||
this.socket = socket; | ||
this.session = socket.session; | ||
this.handshake = socket.handshake; | ||
this.session = socket.handshake.session; | ||
var req = socket.client.request; | ||
this.sessionID = req.sessionID; | ||
this.sessionID = socket.handshake.sessionID; | ||
this.headers = req.headers; | ||
@@ -20,0 +20,0 @@ this.query = req._query; |
{ | ||
"name": "express.oi", | ||
"version": "0.0.19", | ||
"version": "0.0.20", | ||
"description": "Realtime-web library, based on express and socket.io", | ||
@@ -21,10 +21,11 @@ "keywords": [ | ||
"dependencies": { | ||
"async": "^1.0.0", | ||
"cookie-parser": "^1.3.5", | ||
"express": "^4.12.3", | ||
"express-session": "~1.11.2", | ||
"lodash": "^3.9.1", | ||
"socket.io": "^1.3.5" | ||
"async": "^1.5.0", | ||
"cookie-parser": "^1.4.0", | ||
"express": "^4.13.3", | ||
"express-session": "^1.12.1", | ||
"express-socket.io-session": "^1.3.1", | ||
"lodash": "^3.10.1", | ||
"socket.io": "^1.3.7" | ||
}, | ||
"main": "lib/index.js" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9894
7
7
166
+ Addedbase64-js@1.5.1(transitive)
+ Addedbuffer@5.7.1(transitive)
+ Addedcookie-parser@1.3.5(transitive)
+ Addedcookie-signature@1.0.7(transitive)
+ Addedcrc@3.8.0(transitive)
+ Addedexpress-session@1.18.1(transitive)
+ Addedexpress-socket.io-session@1.3.5(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addedrandom-bytes@1.0.0(transitive)
+ Addeduid-safe@2.1.5(transitive)
- Removedbase64-url@1.2.1(transitive)
- Removedcrc@3.3.0(transitive)
- Removeddepd@1.0.1(transitive)
- Removedexpress-session@1.11.3(transitive)
- Removeduid-safe@2.0.0(transitive)
- Removedutils-merge@1.0.0(transitive)
Updatedasync@^1.5.0
Updatedcookie-parser@^1.4.0
Updatedexpress@^4.13.3
Updatedexpress-session@^1.12.1
Updatedlodash@^3.10.1
Updatedsocket.io@^1.3.7