I have deployed my React app successfully in Netifly.
My app live URL
Here is my package.json
file's scripts
:
"scripts": {
"start": "react-scripts start",
"json-server": "json-server --watch db.json --port 3003",
"start:dev": "concurrently "npm start" "npm run json-server"",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
}
But the problem is: the site unable to show any kind of data. Please visit to have an idea. Because, json-server
as backend serves db.json
. It's not running in production.
Locally i can run yarn start:dev
but couldn't able to run both scripts concurrently. What will be the proper scripts
to run both react-scripts start
&& json-server --watch db.json --port 3003
in production?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…