Skip to content

KnowGroup/MongoDB-Fundaments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mongodb

Learn mongodb (a schema-less NoSQL document database) using

  • Node.js : An open-source, cross-platform JavaScript run-time environment that executes JavaScript code outside of a browser.
  • Mongoose : An Object Data Modeling (ODM) library for MongoDB and Node.js. It manages relationships between data, provides schema validation, and is used to translate between objects in code and the representation of those objects in MongoDB.
  • Mocha : A JavaScript test framework for Node.js programs, featuring browser support, asynchronous testing, test coverage reports, and use of any assertion library.
  • Nodemon : Simple monitor script for use during development of a node.js app, use nodemon instead of node to run your code, and now your process will automatically restart when your code changes.
  • Studio 3T : MongoDB IDE GUI

Promise

Promise is a tool to implement asynchronous code, it helps implement any code that is set to be executed in future.

There are three stages of Promise

  1. UnResolved : Waiting for precondition code to finish.
  2. Resolved : Result is as expected.
  3. Rejected : Failed case.

Collections

The collection is the core unit of what stores data inside of a Mongo database will traditionally have one collection for each type of resource that we might need to make available in our application.

Mongoose

Mongoose is a library that provides API to work with Mongo DB.

Moka

Moka testing framework to test Mongoose API.

Mongo Update Operators

https://docs.mongodb.com/manual/reference/operator/update/