|
3 | 3 | # HackYourFuture Node.js - Homework week 3
|
4 | 4 |
|
5 | 5 | ### Assignment for this weak:
|
6 |
| -Create Node JS server that |
7 | 6 |
|
8 |
| -- Listens on port 8080 |
| 7 | +- Fork https://github.com/HackYourFuture/class7-nodejs-week3.git. |
| 8 | +- Read through the code, make sure you understand the flow of the program |
| 9 | +- Add three more actions |
| 10 | + - `clear` (`DELETE /todos`) which will clear the list of todos |
| 11 | + - `markAsDone` (`POST /todos/:id/done`) which will set the `done` flag of a single todo to `true` |
| 12 | + - `markAsNotDone` (`DELETE /todos/:id/done`) which will set the `done` flag of a single todo to `false` |
| 13 | +- Update your README to reflect your new actions! |
9 | 14 |
|
10 |
| -- Allows users to list todos, get a todo, delete a todo, delet all todos, and update a todo. |
11 |
| - |
12 |
| -Some other notes: |
13 |
| -- All responses should be in JSON. |
14 |
| -- Follow the REST design principles: Use the proper method, response status codes, and consistent URL paths. |
15 |
| -- Try to apply the MVC model to your file structure. It will save you time in following assignments! |
16 |
| -- Test your API using Postman. |
17 |
| -- There is a commented out example to start with in my `index.js` |
| 15 | +Take care of the following: |
18 | 16 |
|
| 17 | +- All requests that need a body should be in JSON, and follow the request structure of the other actions |
| 18 | +- All responses should be in JSON, and follow the response structure of the other actions |
| 19 | +- Follow the REST design principles: use the proper method, response status codes, and consistent URL paths |
| 20 | +- Test your API using Postman |
0 commit comments