Mongoose models

Next, we are going to look at the Mongoose models. As we have seen earlier, we have three collections in the database and we have three Mongoose models associated with these collections. You can find the models inside the server\models folder.The server\models\user.ts has the models and password encryption and validation logic present. server\models\thread.ts has the model to work with thread collection, and server\models\message.ts has the model to work with message collection.

Get Google Cloud AI Services Quick Start Guide 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.