From 7e87b7792fec4da4576160c669ee7b6d38420104 Mon Sep 17 00:00:00 2001 From: typicode Date: Wed, 13 May 2015 06:00:22 +0200 Subject: [PATCH] Update README.md --- README.md | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 035461c..6c798fc 100644 --- a/README.md +++ b/README.md @@ -14,18 +14,10 @@ Create a `db.json` file ```javascript { "posts": [ - { - "id": 1, - "title": "json-server", - "author": "typicode" - } + { "id": 1, "title": "json-server" } ], "comments": [ - { - "id": 1, - "body": "some comment", - "postId": 1 - } + { "id": 1, "body": "some comment", "postId": 1 } ] } ``` @@ -39,11 +31,7 @@ $ json-server db.json Now if you go to [http://localhost:3000/posts/1](), you'll get ```javascript -{ - "id": 1, - "title": "json-server", - "author": "typicode" -} +{ "id": 1, "title": "json-server" } ``` 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)