Skip to content

Commit 037b6c3

Browse files
committed
Update README.md
1 parent 3dba8ee commit 037b6c3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ Created with <3 for front-end developers who need a quick back-end for prototypi
1111

1212
Create a `db.json` file
1313

14-
```javascript
14+
```json
1515
{
1616
"posts": [
17-
{ "id": 1, "title": "json-server" }
17+
{ "id": 1, "title": "json-server", "author": "typicode" }
1818
],
1919
"comments": [
2020
{ "id": 1, "body": "some comment", "postId": 1 }
@@ -30,8 +30,8 @@ $ json-server db.json
3030

3131
Now if you go to [http://localhost:3000/posts/1](), you'll get
3232

33-
```javascript
34-
{ "id": 1, "title": "json-server" }
33+
```json
34+
{ "id": 1, "title": "json-server", "author": "typicode" }
3535
```
3636

3737
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)