Mongoose | MongoDB with Nest.js

I highly prefer to use a combination of Mongoose and the mongoose nestjs library. The pro of use only the Nestjs library is that you basically don’t need to use an interface, only the schema directly. If you use mongoose directly to define the schema, you need to use an interface to create each object in the MongoDB.

Create a complicated schema with Mongoose using NestJS can be a pain in certain way, but once you dominate it, it is pretty cool how it works.

So let’s create an application that manages Users, Clients, Products and Sales.

#mongoose #nestjs #mongodb #node #nodejs

How to connect to a MongoDB with Nest.js
2.80 GEEK