From 3401c78ed9d9d5458ab9654efbafd79aa3934e94 Mon Sep 17 00:00:00 2001 From: ihollander Date: Tue, 13 Apr 2021 06:23:26 -0400 Subject: [PATCH] Updated json-server script --- README.md | 5 +++-- package.json | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4a71edcc..a5b98d75 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/package.json b/package.json index f823407d..9624bbbd 100644 --- a/package.json +++ b/package.json @@ -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": [