Hay que instalar.
Un paquete de NPM link para instalar.
Install JSON Server
sudo npm install -g json-server
Create a db.json file with some data
{
"posts": [
{ "id": 1, "title": "json-server", "author": "typicode" }
],
"comments": [
{ "id": 1, "body": "some comment", "postId": 1 }
],
"profile": { "name": "typicode" }
}
Start JSON Server
Cambiar el puerto si el 3000 está ocupado.
json-server --watch db.json
json-server --watch db.json --pott 4000