This code base contains the sample code for doing data modelling in Mongodb using Mongoose
- Create Schema
- Create the database in MongoDB programmatically
- Create the collection in MongoDB programmatically
- Putting inbuilt constraints on the model schema
- Creating custom validators for the model schema
- CRUD operations with MongoDB using Mongoose
The whole repo is divided into multiple branches. Each branch contains code for a specific concept. For example part1 has the basic setup and schema concept. Each branch is built on the top of the previous branch
- Understanding of Node.js
- Understanding of Async Await
- Mongo DB locally installed and running
- Node.js
- mongoose
this app requires Node.js v14+ to run.
Install the dependencies and devDependencies and start the server.
cd learn-mongoose
npm install
npm run devStart
Want to improve? Great! Make the changes and raise a PR. Reach out to me over kankvish@gmail.com