{"action":"created","issue":{"url":"https://api.github.com/repos/jdesboeufs/connect-mongo/issues/58","repository_url":"https://api.github.com/repos/jdesboeufs/connect-mongo","labels_url":"https://api.github.com/repos/jdesboeufs/connect-mongo/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/jdesboeufs/connect-mongo/issues/58/comments","events_url":"https://api.github.com/repos/jdesboeufs/connect-mongo/issues/58/events","html_url":"https://github.com/jdesboeufs/connect-mongo/pull/58","id":11918280,"number":58,"title":"Update connect-mongo.js","user":{"login":"eguvenc","id":482833,"avatar_url":"https://avatars.githubusercontent.com/u/482833?v=3","gravatar_id":"","url":"https://api.github.com/users/eguvenc","html_url":"https://github.com/eguvenc","followers_url":"https://api.github.com/users/eguvenc/followers","following_url":"https://api.github.com/users/eguvenc/following{/other_user}","gists_url":"https://api.github.com/users/eguvenc/gists{/gist_id}","starred_url":"https://api.github.com/users/eguvenc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eguvenc/subscriptions","organizations_url":"https://api.github.com/users/eguvenc/orgs","repos_url":"https://api.github.com/users/eguvenc/repos","events_url":"https://api.github.com/users/eguvenc/events{/privacy}","received_events_url":"https://api.github.com/users/eguvenc/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":22,"created_at":"2013-03-12T10:36:47Z","updated_at":"2016-12-23T06:36:14Z","closed_at":"2014-12-24T11:20:34Z","pull_request":{"url":"https://api.github.com/repos/jdesboeufs/connect-mongo/pulls/58","html_url":"https://github.com/jdesboeufs/connect-mongo/pull/58","diff_url":"https://github.com/jdesboeufs/connect-mongo/pull/58.diff","patch_url":"https://github.com/jdesboeufs/connect-mongo/pull/58.patch"},"body":"if user not created an auth for database ( especially work on localhost ) mongodb returns an TTL error because of it couldn't write to database via ensureIndex(), console.log(err) help to us to see mongodb error. ;)\n"},"comment":{"url":"https://api.github.com/repos/jdesboeufs/connect-mongo/issues/comments/268946941","html_url":"https://github.com/jdesboeufs/connect-mongo/pull/58#issuecomment-268946941","issue_url":"https://api.github.com/repos/jdesboeufs/connect-mongo/issues/58","id":268946941,"user":{"login":"rahulswimmer","id":11225247,"avatar_url":"https://avatars.githubusercontent.com/u/11225247?v=3","gravatar_id":"","url":"https://api.github.com/users/rahulswimmer","html_url":"https://github.com/rahulswimmer","followers_url":"https://api.github.com/users/rahulswimmer/followers","following_url":"https://api.github.com/users/rahulswimmer/following{/other_user}","gists_url":"https://api.github.com/users/rahulswimmer/gists{/gist_id}","starred_url":"https://api.github.com/users/rahulswimmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rahulswimmer/subscriptions","organizations_url":"https://api.github.com/users/rahulswimmer/orgs","repos_url":"https://api.github.com/users/rahulswimmer/repos","events_url":"https://api.github.com/users/rahulswimmer/events{/privacy}","received_events_url":"https://api.github.com/users/rahulswimmer/received_events","type":"User","site_admin":false},"created_at":"2016-12-23T06:36:14Z","updated_at":"2016-12-23T06:36:14Z","body":"Following is my code for express web server and mongoose connection:\r\n\r\nvar express = require('express');\r\nvar bodyParser = require('body-parser');\r\nvar cookieParser = require('cookie-parser');\r\nvar expressSession = require('express-session');\r\nvar mongoStore = require('connect-mongo')({session:expressSession});\r\nvar mongoose = require('mongoose');\r\n\r\nrequire('./models/users_model.js');\r\n\r\nvar conn = mongoose.connect(\"mongodb://localhost:/myapp\");\r\nvar app = express();\r\n\r\napp.set(\"view engine\",\"html\");\r\napp.set('views','/views');\r\napp.engine('.html', require('ejs').__express);\r\n\r\napp.use(bodyParser.urlencoded({extended:true}));\r\napp.use(bodyParser.json());\r\napp.use(cookieParser());\r\napp.use(expressSession({\r\n  secret: 'SECRET',\r\n  cookie: {maxAge: 60*60*1000},\r\n  store: new mongoStore({\r\n      db: mongoose.connection.db,\r\n      collection: 'sessions',\r\n    })\r\n  }));\r\nrequire('./routes')(app);\r\n\r\napp.listen(9090);\r\n\r\nWhen i run this file, i get the following error:\r\n\r\nError: Error setting TTL index on collection : sessions\r\n    at C:\\Rahul13615\\nodejseg\\Project\\UserAccount\\node_modules\\connect-mongo\\lib\r\n\\connect-mongo.js:161:23\r\n    at C:\\Rahul13615\\nodejseg\\Project\\UserAccount\\node_modules\\mongoose\\node_mod\r\nules\\mongodb\\lib\\mongodb\\db.js:1430:36\r\n    at __executeInsertCommand (C:\\Rahul13615\\nodejseg\\Project\\UserAccount\\node_m\r\nodules\\mongoose\\node_modules\\mongodb\\lib\\mongodb\\db.js:1829:12)\r\n    at Db._executeInsertCommand (C:\\Rahul13615\\nodejseg\\Project\\UserAccount\\node\r\n_modules\\mongoose\\node_modules\\mongodb\\lib\\mongodb\\db.js:1930:5)\r\n    at C:\\Rahul13615\\nodejseg\\Project\\UserAccount\\node_modules\\mongoose\\node_mod\r\nules\\mongodb\\lib\\mongodb\\db.js:1427:14\r\n    at C:\\Rahul13615\\nodejseg\\Project\\UserAccount\\node_modules\\mongoose\\node_mod\r\nules\\mongodb\\lib\\mongodb\\db.js:1560:7\r\n    at C:\\Rahul13615\\nodejseg\\Project\\UserAccount\\node_modules\\mongoose\\node_mod\r\nules\\mongodb\\lib\\mongodb\\cursor.js:162:16\r\n    at commandHandler (C:\\Rahul13615\\nodejseg\\Project\\UserAccount\\node_modules\\m\r\nongoose\\node_modules\\mongodb\\lib\\mongodb\\cursor.js:706:16)\r\n    at C:\\Rahul13615\\nodejseg\\Project\\UserAccount\\node_modules\\mongoose\\node_mod\r\nules\\mongodb\\lib\\mongodb\\db.js:1806:9\r\n    at Server.Base._callHandler (C:\\Rahul13615\\nodejseg\\Project\\UserAccount\\node\r\n_modules\\mongoose\\node_modules\\mongodb\\lib\\mongodb\\connection\\base.js:442:41)\r\n\r\nPlease help me!"}}
{"actor":{"display_login":"rahulswimmer"}}