I'm not sure that I'm even asking the right question so I hope you guys can point me in the right direction here.
I have a full stack web app which has listings (think eBay, Gumtree, Craigslist) and I want to implement functionality which allows for featured or premium listings.
The best way I thought to implement this would be to enter an
isFeatured: true field into the listing in MongoDB along with a
featuredStatusExpiresAt: with some timestamp such that when the timer expires, the field
isFeatured: changes to
false and so when the listings are called, the ones which have expired are no longer called.
I do not know of a way to make the server wait for a timestamp such that after a particular, specific time, it makes changes to the database
Edit: My tech stack is: Node.js, Express and MongoDB