Skip to content

Commit 446b76e

Browse files
committed
Added mock data
1 parent 3550c34 commit 446b76e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

mock/todos.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
'use strict';
22

33
var express = require('express');
4+
var todos = require('../../mock/todos.json');
45

56
var router = express.Router();
67

78
router.get('/todos', function(req, res) {
8-
res.json({ todos: [] });
9+
res.json({ todos: todos });
910
});
1011

1112
// TODO: Add POST route to create new entries

0 commit comments

Comments
 (0)