General Assembly Logo

Cookbook App

Prerequisites

  • Express
  • Mongoose & MongoDB
  • Mongoose Queries
  • Routes & Controllers
  • Postman

Instructions

  1. Fork and clone this repository.
  2. Change into the new directory.
  3. Install dependencies by running npm install
  4. Run npm audit fix to make sure all packages are up to date
  5. Fulfill the listed requirements.

Starter code is available to you in the main project repo. You are required to turn in your submission by making a pull request on the original repository.

Requirements

  1. Start your server from the terminal by running: npm run dev
  2. Your connection and seed files are already set up for you. Start by working through the prompts inside
  • Author.js
  • Cookbook.js
  1. Run mongod in your terminal. In a different tab, seed your data from the command line. Use mongo to make sure your data was inserted.
  2. Review the prompts that are provided to you in the following files:
  • server.js
  • controllers/cookbookRoutes.js
  • controllers/authorRoutes.js
  1. In the order the files are listed above, work through the prompts, adding your code block under each prompt. Check each route as you complete them.
  2. Submit with a pull request on this repo.

Routing Table

Update the below routing table with the routes

URL HTTP Verb Action Description
/api/authors/ GET index get all authors
/api/authors/ POST create create a new author
/api/authors/:firstname GET show get a single author by first name
/api/authors/:id PUT update update a single author
/ DELETE destroy destroy a single author
URL HTTP Verb Action Description
/api/cookbooks/ GET index get all cookbooks
/api/cookbooks/year/:year GET index get cookbook by year published
/api/cookbooks/ POST create create a new cookbook
/api/cookbooks/:title GET show get an author by title
/api/cookbooks/:id PUT update update a cookbook
/api/cookbooks/:title DELETE destroy destroy an author

Plagiarism

Take a moment to refamiliarize yourself with the Plagiarism policy. Plagiarized work will not be accepted.

  1. All content is licensed under a CC­BY­NC­SA 4.0 license.
  2. All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact legal@ga.co.