Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 975 Bytes

README.md

File metadata and controls

38 lines (27 loc) · 975 Bytes

mongodbapi

Mongodbapi is a MongoDB interface designed to create CRUD operations (create, read, update and delete documents).

Prerequisites

Installation

$ npm install mongodbapi

Overview

Managing docs with mongodbapi is very easy, you just need to create a mongo object passing a connection string, and then executing a CRUD operator:

let mongoapi = require('mongodbapi');

const connection = 'mongodb://127.0.0.1:27017/local';
let mongo = new mongoapi(connection);

let command = { collection: 'test' };
mongo.read(command).then( (result) => {

    console.log(result);

}, (err) => {

    console.log(err);

} );

Please click here for complete documentation