Reviewing models and server-side structure

So far, we have gained real knowledge of the Mongoose models and MongoDB. Now it is time to see them in action in our application, and to get familiarized with the server directories.

The server folder

We have already covered in detail the main folders (client, server, and e2e) of the client directory in the previous chapter. In this chapter, we are going to focus solely on the server directory. Here is an overview what it looks like:

meanshop/server
├── api              - Server API components ├── auth - Authentication handlers ├── components - App-wide/reusable components ├── config - App configuration │ └── local.env.js - Environment variables │ └── environment - Node environment configuration ├── views - Server rendered ...

Get Web Application Development with MEAN 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.