File tree 4 files changed +20
-28
lines changed
4 files changed +20
-28
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
var nconf = require ( 'nconf' ) ;
2
2
var getDb = require ( 'mongo-getdb' ) ;
3
3
4
- getDb . init ( { url : nconf . get ( "db" ) } ) ;
4
+ getDb . init ( nconf . get ( "db" ) , {
5
+ server : {
6
+ socketOptions : {
7
+ connectTimeoutMS : 500 ,
8
+ keepAlive : 300
9
+ }
10
+ }
11
+ } ) ;
5
12
6
13
module . exports = getDb ;
Original file line number Diff line number Diff line change 1
- var express = require ( 'express' ) ;
2
- var getDb = require ( './data' ) ;
3
- var xtend = require ( 'xtend' ) ;
4
- var MongoStore = require ( 'connect-mongo' ) ( express ) ;
1
+ var getDb = require ( './data' ) ;
2
+ var Yams = require ( 'yams' ) ;
5
3
6
- var dbAndCred = getDb . getDbAndCredentials ( ) ;
7
-
8
- var store = new MongoStore ( xtend ( dbAndCred , {
9
- collection : 'sessions' ,
10
- auto_reconnect : true ,
11
- ensureIndex : false
12
- } ) ) ;
13
-
14
- module . exports = store ;
4
+ module . exports = new Yams ( function ( callback ) {
5
+ getDb ( function ( db ) {
6
+ callback ( null , db . collection ( 'sessions' ) ) ;
7
+ } ) ;
8
+ } ) ;
Original file line number Diff line number Diff line change 11
11
"passport" : " ~0.1.12" ,
12
12
"jade" : " ~0.27.7" ,
13
13
"winston-email" : " 0.0.6" ,
14
- "mongodb" : " ~1.2.14 " ,
14
+ "mongodb" : " ~1.3.15 " ,
15
15
"xtend" : " ~2.0.3" ,
16
- "mongo-getdb" : " 0.0.6" ,
17
16
"connect-mongo" : " https://github.com/jfromaniello/connect-mongo/tarball/master" ,
18
- "ejs" : " ~0.8.4"
17
+ "ejs" : " ~0.8.4" ,
18
+ "connect" : " ~2.8.5" ,
19
+ "yams" : " 0.0.2" ,
20
+ "mongo-getdb" : " ~1.0.1"
19
21
},
20
22
"main" : " app.js" ,
21
23
"scripts" : {
You can’t perform that action at this time.
0 commit comments