Originally used connect-mongo
, may be the Express version of the upgrade error, instead connect-mongodb
, but after the use of the following warning:
G:\nodejs\moviesite>gruntrunning "Concurrent:tasks" (concurrent) Task Running "Nodemon:dev" (Nodemon) Task Runnin G "Watch" task waiting ... [Nodemon] v1.3.7 [Nodemon] to restart at any time, enter ' RS ' [Nodemon] Watching: *. * [Nodemon] starting ' node AP P.js ' =========================================================================================Please ensure so you set the default write concern for the database bysetting = =One of the options==== w: (Value of >-1 or the string ' majority '), where < 1 means ==No write acknowledgement== Journal: True/false, wait for flush to journal before acknowledgement == Fsync: true/false, wait for flush to file system before Acknowledgemen t = ===For backward compatibility safe is still supported and==allows values of [true | false | {J:true} | {W:N, wtimeout:n} | {Fsync:tRue}] = =The default value is false which means the driver receives does not== return The information of the success/error of the Insert/update/remove==== ex: new Db(' localhost ', 27017), { safe: False}) ==== http://www.mongodb.org/display/docs/getlasterror+Command ====The default of no acknowledgement would change in the very near future====This message would disappear when the default safe was set on the driver Db =========================================================================================Sat, June 12:49:12 GMT express-session deprecated undefined resave option; Provide resave option at App.js:20:9sat, June 12:49:12 GMT express-session deprecated undefined saveuninitialized o ption; Provide saveuninitialized option at App.js:20:9 MovieSite started on port 3000
The warning below will be resolved by adding two attribute values restart and saveuninitialized to the session.
Sat, 27June2015 12:: GMT express-session deprecated undefined resave option;provide resave option at app. js:: 9Sat, 27June2015 12:: GMT express-session deprecated undefined saveuninitialized option;provide saveuninitialized option at app. js:: 9Such as:app. Use(Session({ resave: false,//re-Save: Forces the session to be saved even if it is not modified. (default ture) saveuninitialized:true,//forces an uninitialized session-to-memory cookie: {maxAge:3600000 },Secret: ' Imooc ',Store: New Mongostore({ URL:dburl, Collection:' Sessions ' }) }))
The rest of the warning should be that the database is not a secure connection and has not been resolved, know friend tell
Nodejs using CONNECT-MONGODB error (please ensure the default write concern)