Skip to content

Instantly share code, notes, and snippets.

@tandavala
Created May 11, 2020 15:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tandavala/834787dc8961e6e2cfd9b96ac1d4a005 to your computer and use it in GitHub Desktop.
Save tandavala/834787dc8961e6e2cfd9b96ac1d4a005 to your computer and use it in GitHub Desktop.
router.route('/fetchdata').get(function(req,res){
employees.find( {{"age" : {$gt : 25}}, function(err, result){
if(err){
res.send(err)
}
else{
res.send(result)
}
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment