Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aa752df

Browse files
committed
fix readme
1 parent fc0e376 commit aa752df

File tree

1 file changed

+2
-44
lines changed

1 file changed

+2
-44
lines changed

README.md

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<<<<<<< HEAD
1+
22
> Please help us improve and share your feedback! If you find better tutorials or links, please share them by opening a Pull Request.
33
44
# HackYourFuture - Node.js
@@ -34,46 +34,4 @@ There are many languages for this. We might've heard of Java, C, C++, Go, Python
3434

3535
There are two reasons why we at HYF choose Node.JS over others:
3636
1) You already know JavaScript, so it's easier to get started than other languages
37-
2) Node.js is great for making web APIs because it is asynchronous by nature and thus allows for high input/output. By this we mean that it allows many users to make very light requests at the same time.
38-
=======
39-
# TODO API
40-
41-
This is an Express application using `bodyParser` middleware to convert the request body to JSON.
42-
43-
There are currently four actions:
44-
45-
- `list` (`GET /todos`): Lists all todos
46-
- `create` (`POST /todos`): Creates a new todo
47-
- `update` (`PUT /todos/:id`): Updates the description of a todo
48-
- `remove` (`DELETE /todos/:id`): Deletes a todo
49-
50-
## Directory structure
51-
52-
- `actions`: Contains the actions as listed above, each as a express handler (function accepting request and response)
53-
- `data`: Contains the data file `todos.json`
54-
- `models`: Contains the Todo model class
55-
- `util`: Utility functions
56-
- `index.js` The application file
57-
58-
## Request body format
59-
60-
When calling the `create` or `update` actions, the request body should look like this:
61-
62-
```json
63-
{
64-
"todo": {
65-
"description": "(todo description)"
66-
}
67-
}
68-
```
69-
70-
Note that for these actions, the client should add the following header:
71-
72-
- `Content-Type`: `application/json`
73-
74-
In Postman, make sure to add this header, and set the Body type to "Raw".
75-
76-
## UUIDs
77-
78-
For IDs, this application uses "UUIDs" (Universally Unique IDs). They can be generated using the `uuid` package, and are guaranteed never to be the same.
79-
>>>>>>> class7-nodejs-week3/master
37+
2) Node.js is great for making web APIs because it is asynchronous by nature and thus allows for high input/output. By this we mean that it allows many users to make very light requests at the same time.

0 commit comments

Comments
 (0)