Skip to content

Commit

Permalink
Updated json-server script
Browse files Browse the repository at this point in the history
  • Loading branch information
ihollander committed Apr 13, 2021
1 parent 773d65b commit 3401c78
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ be using `json-server` to create a RESTful API for our database.

Run `npm install` to install our dependencies.

Then, run `npm start` to start up `json-server` on `http://localhost:3001/toys`
alongside our React app at `http://localhost:3000`.
Then, run `npm run server` to start up `json-server` on `http://localhost:3001`.

In another tab, run `npm start` to start up our React app at `http://localhost:3000`.

Before you start building out the application, the first step that you should
take is to draw out your component hierarchy. This will tell you how components
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"json-server": "^0.15.1"
},
"scripts": {
"start": "json-server --watch db.json -p 3001 & open http://localhost:3001/toys & react-scripts start && fg"
"start": "react-scripts start",
"server": "json-server --watch db.json -p 3001"
},
"eslintConfig": {
"extends": [
Expand Down

0 comments on commit 3401c78

Please sign in to comment.