I created a react-app with npx create-react-app in package.json added json-server and run script.
"devDependencies": {
"json-server": "0.14.2",
"react-scripts": "1.0.10",
"styled-components": "^2.1.1"
},
"scripts": {
"apiserver": "json-server -p 3001 -w tools/db.json",
When I start the json-server with npm run apiserver it starts successfully. But home page does not load.
\{^_^}/ hi!
Loading tools/db.json
Done
Resources
http://localhost:3001/posts
Home
http://localhost:3001
Type s + enter at any time to create a snapshot of the database
Watching...
Not loading :(
Also I have json-server installed globally. So when I start it like that:
json-server -w db.json -p 3001
It loads successfully:

