First of all Thanks for Looking at my code! I actally had alot of fun doing this, Please feel free to message me any quetions!
This Project really has 2 Parts that you need to run both React.JS and a NPM Package called JSON-Server ( A mock API Rest server that runs on your local Machine) :)
You could in theory just need React.js but the POST request wouldnt return.
You’ll need to have Node >= 14.0.0 and npm >= 5.6 on your machine.
- Download My main Branch
- Unzip to a location
- Open a CMD windown inside ReactFullStack-main (should have 7 entities inside that folder)
- Run Command
NPM install- This will download all of the packages that React Application requires. These are located in the package.Json This might take a couple minutes.
- Run Command
NPM start- This should launch my application in your browser, BUT you arent done yet!
Luckily you already installed the package we need, We just need to turn it on!
- Open another CMD window in the same place as we did before !
- Take Note of the 2 files in the Folder
- db.json and routes.json
- In that Command window,
- Type this command
json-server --watch "PATH TO db.json FILE" --routes "PATH TO routes.json FILE" --port 8000
- Type this command
- In the end you shoould have two CMDs open,
- One with React Server Running
- One With the JSON server running
- At this point you are ready to run the application in the browser! Please let me know if you have any feed back!