1.0.1 • Published 6 years ago

mango-aliyan v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

Mango Aliyan

easy to use mongodb librabry using mongo driver module.

** callback will be replaced with async/promices soon.

npm i mango-aliyan

const URL = "mongodb://127.0.0.1:27017/";
const collectionStructure ={
  "schooldb":["studentCollection","staffCollection"]
};
const mongo = new MangoAliyan(URL,collectionStructure,onceDBIsReady);
function onceDBIsReady(err, mongo){
    console.info("connected..");  
    
    /*any db operations to be performed after establishing the connectivity*/
    /*mongo.schooldb.studentCollection.[insert/distinct/findOne etc](..)*/
}
 mongo.schooldb.studentCollection.[insert/distinct/findOne etc](..)