This commit is contained in:
Tyrel Souza 2017-11-29 23:32:28 -05:00
parent d4b45e1bd8
commit ee9ed42f96

View File

@ -21,6 +21,15 @@ app.post('/todos', (req, res) => {
});
});
app.get('/todos', (req, res) => {
var todos = Todo.find().then((todos) => {
return res.send({todos});
}, (e) => {
return res.status(400).send(e);
});
});
app.listen(8888, () => {
console.log("Started on port 8888");
});