The following code is written in server.js file which is nodejs code
app.get("/api/todos",function(req, res){
todo.find(function(error, todos){
if(error)
res.send(error);
res.json(todos);
});
});
Now I want to call that into my spreadTest.js which is using spread.js, how do I do that?