In mongoose
I can set the expiration of a document defining a column in this way:
expire_at: {
type: Date,
default: Date.now,
expires: 7200
}
The code above will remove the record within two hours.
How can I set the expire_at
to a specific date?