- Express
- Mongoose & MongoDB
- Mongoose Queries
- Routes & Controllers
- Postman
- Fork and clone this repository.
- Change into the new directory.
- Install dependencies by running
npm install
- Run
npm audit fix
to make sure all packages are up to date - 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.
- Start your server from the terminal by running:
npm run dev
- Your connection and seed files are already set up for you. Start by working through the prompts inside
Author.js
Cookbook.js
- 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. - Review the prompts that are provided to you in the following files:
server.js
controllers/cookbookRoutes.js
controllers/authorRoutes.js
- 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.
- Submit with a pull request on this repo.
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 |
Take a moment to refamiliarize yourself with the Plagiarism policy. Plagiarized work will not be accepted.
- All content is licensed under a CCBYNCSA 4.0 license.
- All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact legal@ga.co.