Is there currently a way to set the expiration of a document at time of creation (save) using Ottoman? I’ve been trying to look for documentation on it and haven’t found anything.
My use case for this is implementing sessions that expire after an hour. Appreciate the help!
Hi @nraboy,
thanks to your videos, I’m using Ottoman to model my data.
now I want to Develop a User Profile Store and Session Store with Node.js and use Ottoman to make my model.
1- Is it needed to model sessions store in ottoman?
var SessionModel = ottoman.model(“Session”, {
pid: “string”
});
2- how to set {expiry:3600}?
I implemented your suggested above approach, but I’m getting this error: TypeError: callback is not a function