From b9d766e03ececb464f26a67077fa5ccc6df1c684 Mon Sep 17 00:00:00 2001 From: Gleb Bahmutov Date: Sat, 21 Dec 2013 15:48:42 -0500 Subject: [PATCH] updated README --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b70a543..ce252cf 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Created with :heart: for front-end developers who need a flexible back-end for q ```bash $ cat db.json -{ +{ posts: [ { id: 1, body: 'foo' } ] @@ -24,6 +24,9 @@ $ json-server --file db.json $ curl -i http://localhost:3000/posts/1 ``` +You can type 's' at any moment to save the current live JSON object to timestamped +file. + ### Node module ```javascript @@ -52,7 +55,7 @@ You can find a running demo here: http://jsonplaceholder.typicode.com. ## Installation ```bash -$ npm install -g json-server +$ npm install -g json-server ``` @@ -113,7 +116,7 @@ Here's 2 examples showing how to format JSON or JS seed file: ```javascript exports.run = function() { var data = {}; - + data.posts = []; data.posts.push({id: 1, body: 'foo'}); //... @@ -180,6 +183,6 @@ For project updates or to get in touch, [@typicode](http://twitter.com/typicde). ## Test ```bash -$ npm install +$ npm install $ npm test ```