im using nodejs and mongoose to build api, im trying to execute a search function, but it doesn't seem to be asking for anything, code.
app.get('/search', function(req,res){
return Questions.find({text: "noodles"}, function(err,q){
return res.send(q);
});
});
this does not give me any results, I know that there should be at least 4 results from this query, thiers 4 documents in the questions database with the word "noodles", everything works with connecting to the database and my node server
source
share