Giter VIP home page Giter VIP logo

book-review-mock-cc-phase-1's Introduction

Book Review Mock Code Challenge

  • Begin by running npm install
  • Then start your json server with the command json-server --watch db.json --routes routes.json

Deliverables

  1. Display the book cover recieved from the server, with its title, description, likes, and reviews when the page loads. Use the endpoint /books/1 to retrieve the data for the book along with its reviews.
GET /books/1

Example Response:
{
  "id": 1,
  "title": "Eat & Run",
  "likes": 0,
  "image": "https://images-na.ssl-images-amazon.com/images/I/71XJTD4o1gL.jpg",
  "reviews": [
    {
      "id": 1,
      "bookId": 1,
      "title": "GREAT READ!!",
      "content": "Loved the book! Started eating vegan after and I feel amazing!"
    },
    {
      "id": 2,
      "bookId": 1,
      "title": "running is dumb",
      "content": "book was stupid AF.  running sucks. eat more meat!"
    },
    {
      "id": 3,
      "bookId": 1,
      "title": "Scott Jurek is the man!!",
      "content": "book was very inspiring loved hearing more about Scott's life!!"
    }
  ]
}
  1. Click on the like button and increase the number of likes on the DOM. No persistence needed.

  2. Add a new review to the page when the #new-review form is submitted. No persistence needed.

Advanced Deliverables

  1. Add a delete button to reviews, when the button is clicked remove the review from the DOM. For extra fun make this persist to the db.json file.

  2. When users like the book, update the book in the db.json.

  3. When users review a book, persist to the db.json.

book-review-mock-cc-phase-1's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.