首页 > 在express使用session与mongodb链接时出现问题

在express使用session与mongodb链接时出现问题

访问浏览器的时候会有这样的错误提示:

Error setting TTL index on collection : sessions

Error: Error setting TTL index on collection : sessions
   

at D:\WEB\node练习\login\work\node_modules\connect-mongo\lib\connect-mongo.js:161:23
 at D:\WEB\node练习\login\work\node_modules\connect-mongo\node_modules\mongodb\lib\mongodb\db.js:1404:28
    at D:\WEB\node练习\login\work\node_modules\connect-mongo\node_modules\mongodb\lib\mongodb\db.js:1542:30
    at D:\WEB\node练习\login\work\node_modules\connect-mongo\node_modules\mongodb\lib\mongodb\cursor.js:159:22
    at commandHandler (D:\WEB\node练习\login\work\node_modules\connect-mongo\node_modules\mongodb\lib\mongodb\cursor.js:678:48)
    at Db._executeQueryCommand (D:\WEB\node练习\login\work\node_modules\connect-mongo\node_modules\mongodb\lib\mongodb\db.js:1802:12)
    at Cursor.nextObject (D:\WEB\node练习\login\work\node_modules\connect-mongo\node_modules\mongodb\lib\mongodb\cursor.js:729:13)
    at Cursor.toArray (D:\WEB\node练习\login\work\node_modules\connect-mongo\node_modules\mongodb\lib\mongodb\cursor.js:158:10)
    at Cursor.toArray (D:\WEB\node练习\login\work\node_modules\connect-mongo\node_modules\mongodb\lib\mongodb\scope.js:10:20)
    at D:\WEB\node练习\login\work\node_modules\connect-mongo\node_modules\mongodb\lib\mongodb\db.js:1541:65

全是警告,没有错误,别理他就是了


随手 Google 就有啊:https://cnodejs.org/topic/53e...

【热门文章】
【热门文章】