Im using this scheme for a session in my node.js app
var mongoose = require(\'mongoose\');
var Schema = mongoose.Schema;
// define the schema for o
To double check the indexes that have been created in the DB you can run this command in your mongo shell db.yourdb.getIndexes()
. When changing the indexes you have to manually delete it in the collection before the new one will take effect. Check here for more information Mongoose expires property not working properly