Vishwa07dev / learn-mongoose

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using Mongoose for data modelling in Node.js with MongoDB

Integrating Mongodb with Node.js

This code base contains the sample code for doing data modelling in Mongodb using Mongoose

Features

  • 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

How is the code organized in this repo ?

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

Prerequisite

  • Understanding of Node.js
  • Understanding of Async Await
  • Mongo DB locally installed and running

Tech

  • Node.js
  • mongoose

Installation

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

Development

Want to improve? Great! Make the changes and raise a PR. Reach out to me over kankvish@gmail.com

About