Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

createdAt expires mongoose

var TestSchema = new mongoose.Schema({
  name: String,
  createdAt: { type: Date, expires: '2m', default: Date.now }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #createdAt #expires #mongoose
ADD COMMENT
Topic
Name
6+7 =