Nashville Software School Kennels
Getting Started
- Clone this repo and
cd
to the created directory. - Run
npm install
to get all dependencies.
Running the API
Right now, the JSON file for the API only exists in the codebase for release 6.0 and later. Therefore, I suggest that you copy the file to another directory on your system and follow the steps below after that is done. Otherwise, when you checkout tag 1-5, the API will no longer work.
My bad. I should have thought of that when I committed release tag 1.0.
Hotel Setup
If you have Hotel installed, follow these steps.
- Run the following command from the directory containing the JSON file.
hotel add 'json-server -p $PORT -w kennel.json' --out kennel.log --port 5002 --name 'react-step-by-step'
- Start Hotel if it isn't running.
- Visit the Hotel web page at http://localhost:2000/ and start the server.
Without Hotel
cd
to the directory containing the JSON file.- Run
json-server -p 5002 -w kennel.json
in its own terminal session to start the API.
Start the Application
Now run npm start
in the project root directory in its own terminal.
Instructor Guide
get checkout 1.0
will take you to the first release to show students a very basic version of the application with hard-coded state so you can show students how state
becomes props
when sent to a child component.
Take a look at all of the releases to see the progression of the code and the topics covered in each one.