R
R
Rillai2020-06-28 13:41:43
npm
Rillai, 2020-06-28 13:41:43

How to run json-server and react at the same time?

Subject.

"scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "api": "json-server --watch db.json"
  },

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hzzzzl, 2020-06-28
@hzzzzl

https://www.npmjs.com/package/concurrently
and something like

scripts: {
    ......
    "dev": "concurrently \"npm run start\" \"npm run api\""
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question