Summary
In this chapter, you learned how to build your first CRUD module. You started by defining the Mongoose model and Express controller and learned how implement each CRUD method. You also authorized your controller methods using Express middleware. Then, you defined a RESTful API for your module methods. You discovered the ngRersource
module and learned how to use to the $resource
factory to communicate with your API. Then, you created your AngularJS entities and implemented the AngularJS CRUD functionality. After connecting the four parts of a MEAN application and creating your first CRUD module, in the next chapter you'll use Socket.io to add real-time connectivity between your server and client applications.