Summary

In this chapter, we worked on setting up mongoose, connecting mongoose to the database. We created few Todos model and run the test script. Next, we looked into mongoose validators, Defaults and types, and customize todo model properties such as test, completed and completedAt. Then, we looked in the basics of Postman and made HTTP request to Google. We also looked into configuring some todo routes, mainly POST /todos and GET /todos. We also looked into creating test cases and testing these routes.

With this in place, we are ready to move on to adding a brand new route, which is coming up in the next chapter.

Get Advanced Node.js Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.