I'm trying to start a json-server and start my React-App in the same script in package.json ...
But the problem is that none of the two scripts give me the prompt back so the second script is never launched ...
I've tried :
"scripts": {
"start": "npm run start-db & npm start-react",
"start-react": "react-scripts start && exit 1",
"start-db": "json-server --watch src/bdd.json -p 3001 && exit 1"
}
with differents combinations of &&
or &
... With or without exit 1
( things that I found here )