Skip to content

Commit 50faba6

Browse files
committed
Update README.md
1 parent 93a6000 commit 50faba6

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
# JSON Server [![](https://travis-ci.org/typicode/json-server.svg)](https://travis-ci.org/typicode/json-server) [![](https://badge.fury.io/js/json-server.svg)](http://badge.fury.io/js/json-server)
1+
# JSON Server [![](https://travis-ci.org/typicode/json-server.svg)](https://travis-ci.org/typicode/json-server) [![](https://badge.fury.io/js/json-server.svg)](http://badge.fury.io/js/json-server) [![Join the chat at https://gitter.im/typicode/json-server](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/typicode/json-server?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
22

33
> Get a full fake REST API with __zero coding__ in __less than 30 seconds__ (seriously)
44
55
Created with <3 for front-end developers who need a quick back-end for prototyping and mocking.
66

7-
Links:
87
* [JSONPlaceholder - Live running version](http://jsonplaceholder.typicode.com)
98
* [Online video tutorial - Creating demo APIs with json-server](https://egghead.io/lessons/nodejs-creating-demo-apis-with-json-server)
109

11-
12-
1310
## Example
1411

1512
Create a `db.json` file
@@ -37,7 +34,7 @@ Now if you go to [http://localhost:3000/posts/1](), you'll get
3734
{ "id": 1, "title": "json-server", "author": "typicode" }
3835
```
3936

40-
Also, if you make POST, PUT, PATCH or DELETE requests, changes will be saved to `db.json`
37+
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)
4138

4239
## Routes
4340

@@ -121,7 +118,7 @@ module.exports = function() {
121118
data = { users: [] }
122119
// Create 1000 users
123120
for (var i = 0; i < 1000; i++) {
124-
data.users.push({ name: 'user' + i })
121+
data.users.push({ id: i, name: 'user' + i })
125122
}
126123
return data
127124
}
@@ -159,7 +156,7 @@ You can deploy JSON Server. For example, [JSONPlaceholder](http://jsonplaceholde
159156

160157
### Articles
161158

162-
* [Fast prototyping using Restangular and Json-server](http://glebbahmutov.com/blog/fast-prototyping-restangular-and-json-server/)
159+
* [Fast prototyping using Restangular and Json-server](http://glebbahmutov.com/blog/fast-prototyping-using-restangular-and-json-server/)
163160
* [ng-admin: Add an AngularJS admin GUI to any RESTful API](http://marmelab.com/blog/2014/09/15/easy-backend-for-your-restful-api.html)
164161
* [how to build quick json REST APIs for development](http://outloudthinking.me/how-to-build-quick-json-rest-apis/)
165162

0 commit comments

Comments
 (0)