This weeks project was about using a database to store and retrieve data from and use that data to produce a RESTful API.
- How to model data in Mongoose
- How to store secret information such as database passwords
- How to fetch items from a Mongo database using Mongoose
- How to seed large amounts of data to a database
- How to return useful error messages from your API endpoints
- Peer code reviews
This weeks challenge for me was to keep track on what is happening where. The code itself was quite similar to last weeks project, but fully understand the structure behind it makes my head spin a bit. As usual stackoverflow and the slack channel helped me once again out when stumbling over problems. I came across quite a few of the problems already solved by some of my teammates.
The requirement were:
- API should have at least 2 routes. Try to push yourself to do more, though!
- A minimum of one endpoint to return a collection of results (array of elements)
- A minimum of one endpoint to return a single result (single element).
- API should make use of Mongoose models to model your data and use these models to fetch data from the database.
- API should be RESTful