1.0.2 • Published 3 years ago

mongo-cruds v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Mongo-Crud is a CRUD operation library library which makes it extremely easy to use multiple crud operation on your web apps. It is highly customizable and enables you to stack multiple quries on top of one another.

Table of Contents

Getting Started

Use your preferred package manager:

npm install mongo-cruds
yarn add mongo-cruds

How to use

1: import mongo_crud from mongo-cruds .

var {mongo_crud} = require("mongo-cruds");

2: Provide Configuraions to connect to db/cluster in an object.

var {mongo_crud} = require("mongo-cruds");

var config={
        URL:"",         //mongo cluster URL
        db:"",          // Database name if any else give empty string
        collection:"",  //Collection name in database
    };

3: Provide object of quries as second parameter.

//  Final way to use mongo-cruds
var {mongo_crud} = require("mongo-cruds");

var config={
        URL:"",         //mongo cluster URL
        db:"",          // Database name if any else give empty string
        collection:"",  //Collection name in database
    };
    
    let results=await mongo_crud(config,{find:"",findOne:{}});
   console.log(results);

Response will be in form of array containing response from each query executed on mongo-crud.

React and Nextjs support:

Mongo-Cruds is compatable with every version of node js and with all frameworks.

Contribution

Open an issue and your problem will be solved.

Author - Contact

Vivek Solanki