swjin

json example

......@@ -14,6 +14,14 @@ app.get('/book/:bookId', function (req, res) {
res.send(books[bookId]);
});
/*
{
"id" : 2,
"name" : "book2",
"price" : 2000,
"author" : "jin"
}
*/
app.post('/book', function (req, res) {
// Create book information
books[req.body.id] = [req.body.id, req.body.name, req.body.price, req.body.author];
......