These are chat archives for Automattic/mongoose

5th
Oct 2018
Andrey Gazhala
@AndreyGazhala
Oct 05 2018 07:50
Hi all. I want to implement infinite scroll with nodejs(experess), mongodb(mongoose), Ionic app(front-end). Does anyone have any examples? I haven't found anything relevant yet.
Ben Chiciudean
@benydc
Oct 05 2018 15:39
if my document doesn’t have a createdAt property, is there way to check when it was created?
Kev
@lineus
Oct 05 2018 15:39
are you using ObjectIds @benydc ?
Ben Chiciudean
@benydc
Oct 05 2018 15:40
yes
Kev
@lineus
Oct 05 2018 15:41
I think the 1st 4 bytes of the objectId is the epoch timestamp
there's a builtin method on ObjectIds, something like getTimeStamp()
it's actually _id.getTimestamp()
Ben Chiciudean
@benydc
Oct 05 2018 15:49
that is so cool!
Kev
@lineus
Oct 05 2018 15:50
yeah, I thought so too :smile: