@@ -24,7 +24,9 @@ Be creative when completing this project and add your own style. However, rememb
24
24
1 . Add a button that will delete the item from the list.
25
25
26
26
1 . Create an empty state view for the list if there are no items in the list.
27
- 1 . Just an element with some text saying something like "Add your first todo" is fine.
27
+ 1 . Just an element with some text saying something like "Add your first todo" is fine. Here is an example:
28
+
29
+ <img src =" https://freshman.tech/assets/images/todo-list/empty-state.gif " />
28
30
29
31
1 . Make sure everything works. Add, delete, and check an item.
30
32
@@ -37,7 +39,8 @@ We are going to use a local mock server to save and persist your data.
37
39
{ "item" : [] }
38
40
```
39
41
40
- 1 . First lets create a structure for the data:
42
+ 1 . First lets design the data structure for our ToDo items. This will be an object that will hold properties to describe each item.
43
+ 1 . When we are ready to create these items, they will populate the array property ` item ` as described above.
41
44
``` json
42
45
{
43
46
"id" : 1 ,
@@ -46,8 +49,12 @@ We are going to use a local mock server to save and persist your data.
46
49
}
47
50
```
48
51
49
- 1 . Run `./start_mock_server.sh`
50
- 1 . The base url of the API will be `http://localhost:3000`
52
+ 1 . Lets run our mock server:
53
+ 1 . Open terminal
54
+ 1 . Navigate to the project folder: `cd Unit4/Unit4-Project`
55
+ 1 . Start the mock server script: `./start_mock_server.sh`
56
+ 1 . The server will run at the endpoint: `http://localhost:3000`
57
+ 1 . Navigate to `http://localhost:3000/item` in your browser to see the empty list of our ToDo items.
51
58
52
59
1 . Update your `js` file to fetch all the items from the API once the document is ready.
53
60
1 . Fetch the data using a `GET` request to `/item`
0 commit comments