npm install
npm install -g json-server
{
"posts": [
{ "id": 1, "title": "json-server", "author": "typicode" }
],
"comments": [
{ "id": 1, "body": "some comment", "postId": 1 }
],
"profile": { "name": "typicode" }
}
npm run serve
npm install -g json-server
json-server --watch db.json
npm run build
Now if you go to http://localhost:3000/posts/1, you'll get (example)
{ "id": 1, "title": "json-server", "author": "typicode" }
npm run lint