Skip to content

Ja Navey#259

Open
JSNavey wants to merge 8 commits intobloominstituteoftechnology:masterfrom
JSNavey:master
Open

Ja Navey#259
JSNavey wants to merge 8 commits intobloominstituteoftechnology:masterfrom
JSNavey:master

Conversation

@JSNavey
Copy link

@JSNavey JSNavey commented Jun 15, 2018

Sprint Challenge MongoDB

  • Decide how you will tackle the problem
  • Fork and Clone this repository.
  • CD into the folder where you cloned the repository.
  • Answer questions in Answer.md.
  • Yarn install. (Need to have “express, helmet, mongoose and cors(??)” in dependencies)
  • Run yarn start, mongo, in separate windows. Use Postman and Compass to check if the data connected.

Modeling our Data

check README to see what DB should look like.

  • Build models for Budget, Expense and Category.
  • Build routers for Budget, Expense and Category.
  • Add relationships (type and ref).

Endpoints

==POST to ‘/budgets’==

  • Used to save a new Budget to the database. Create only one.
    ==POST to ‘/categories’==
  • Create a category by using ‘post’ method and ‘get’ to return all categories.
  • Filer out unuseful info, only show “title”.
  • Create a minimum of 4 categories - Food/Dining, Gas/Auto, Date Night or Mortgage, etc.
    ==‘/expenses’==
  • Create an expense by using ‘post’ method. To save an expense you’ll need an “budget” _id and “category” _id so that we can build out a relationship between those other collections and our expenses.
  • Use ‘get’ method that returns all the expenses with the populated data.

Stretch Problems

  • Add as many CRUD endpoints as you can and break the application into separate Routers.
  • Validate the data at the endpoint, before saving it to the database.
  • Add a React front end.

@designerexpert
Copy link

Comments

  • Great job reaching MVP 👍
  • I Think you have the potential to even finish the Stretches. Give them a try on the weekend if you have some spare time.
  • You understand the concepts well and are able to creatively implement them!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants