diff --git a/server/server.js b/server/server.js index 7130e5e..8c7d4bf 100644 --- a/server/server.js +++ b/server/server.js @@ -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"); });