先にNode.jsをインストール
Node.jsをインストール - MBP(はてな)
なぜか、 $ json-server –watch db.jsonでエラーになるので、
$ json-server db.json
& はエスケープが必要。¥&とする。
curl -X POST http://localhost:3000/posts/ -d ‘id=2¥&title=json-server2¥&author=typicode2’
PUTは$ curl -X PUT。& はエスケープが必要。¥&とする。
$ curl -X PUT http://localhost:3000/posts/2 -d ‘id=3¥&title=json-server3¥&author=typicode3’