We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3550c34 commit 446b76eCopy full SHA for 446b76e
mock/todos.json
@@ -0,0 +1,6 @@
1
+[
2
+ {"name": "reply to dad's tech question email from two weeks ago"},
3
+ {"name": "reveal identity of the left shark"},
4
+ {"name": "sing karaoke like nobody's watching"},
5
+ {"name": "reply to dad's follow up email after the first reply"}
6
+]
src/api/index.js
@@ -1,11 +1,12 @@
'use strict';
var express = require('express');
+var todos = require('../../mock/todos.json');
var router = express.Router();
7
8
router.get('/todos', function(req, res) {
- res.json({ todos: [] });
9
+ res.json({ todos: todos });
10
});
11
12
// TODO: Add POST route to create new entries
0 commit comments