- Clone the repo onto your local machine
- Navigate into the directory
- Run
npm install
-
Make sure you have MySQL installed (
mysql -V
) -
Navigate into your MySQL shell, create a user and grant them all permissions. For example, once you're in your MySQL shell, run these commands:
CREATE USER 'hrstudent'@'localhost' IDENTIFIED BY '1q@W3e$R';
GRANT ALL PRIVILEGES ON * . * TO 'hrstudent'@'localhost';
FLUSH PRIVILEGES;
- In your terminal,
cd
back to the cloned repo and run this command to connect to the database:mysql -u hrstudent -p < server/schema.sql
- Run this command to seed the database:
npm run seed
, then "Control + C" to stop the seeding script - (Optional) Navigate into your MySQL shell to check that the script actually created and seeded the database
- To start the client:
npm run start-client
- In a separate terminal, to start the server:
npm run start-server
- In your browser, open up
localhost:3004
to view the running service
Action | Method | URL |
---|---|---|
Creates new review | Post | /api/reviews/ |
Gets all reviews for particular product | Get | /api/reviews/:id |
Updates a review | Put | /api/reviews/ |
Deletes a review | Delete | /api/reviews/:id |
- Email me: joebuono724(at)gmail.com