Skip to content

Commit 7e87b77

Browse files
committed
Update README.md
1 parent e53d3bc commit 7e87b77

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

README.md

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,10 @@ Create a `db.json` file
1414
```javascript
1515
{
1616
"posts": [
17-
{
18-
"id": 1,
19-
"title": "json-server",
20-
"author": "typicode"
21-
}
17+
{ "id": 1, "title": "json-server" }
2218
],
2319
"comments": [
24-
{
25-
"id": 1,
26-
"body": "some comment",
27-
"postId": 1
28-
}
20+
{ "id": 1, "body": "some comment", "postId": 1 }
2921
]
3022
}
3123
```
@@ -39,11 +31,7 @@ $ json-server db.json
3931
Now if you go to [http://localhost:3000/posts/1](), you'll get
4032

4133
```javascript
42-
{
43-
"id": 1,
44-
"title": "json-server",
45-
"author": "typicode"
46-
}
34+
{ "id": 1, "title": "json-server" }
4735
```
4836

4937
Also, if you make POST, PUT, PATCH or DELETE requests, changes will be automatically saved to `db.json` using [lowdb](https://github.com/typicode/lowdb)

0 commit comments

Comments
 (0)