python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
Auto delete a document after specific time in mongoDB
I want to delete a document after a specified amount of time. Like if the user selects 24 hours then it should be auto-deleted after 24 hours. I heard about TTL in mongo but in that, I have to specify...
Het Delwadiya
Votes: 0
Answers: 2
Is there a way I could refactor this Code?
I want to refactor this code so I can put the whole DB query logic in a different file and just call only the function in this file, how would I go about that?
passport.use(
new GoogleStrategy({
...
Chigalakingsley
Votes: 0
Answers: 1
Setting value via dynamically generated key in then-block of a returned findOne() promise in Mongoose Node.js
I would like to write a function that can be called whenever I set a default value in my Schema.
At the moment I keep repeating the same code as default value (getting the default SVG from its collect...
UnsteadyShaggy
Votes: 0
Answers: 0
Mongodb Index & mongoose
I have an update query that i need to run, and I have noticed it is slow.
const nowplayingData = {"type":"S","station": req.params.stationname, "song": data[1]...
RUSSELL HARROWER
Votes: 0
Answers: 1