I set a JSON file to use as a little practice database, but I can't run the server.
I've already tried to install (and reinstall) json-server global and locally npm install -g json-server
and npm install json-server
and then run json-server --watch db.json
, but it doesn't work.
I've also tried to set a script in the package.json file "load": "json-server --watch db.json"
and run the script node load
.
But nothing seems to work and I keep getting in return the message:
"'json-server' command not found"
or, in Portuguese:
"'json-server' não é reconhecido como um comando interno ou externo, um programa operável ou um arquivo em lotes".
How can I fix this?