JSPM

mongo-driverify

1.0.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q24360F
  • License MIT

Simple basic driver for node and mongo db combination

Package Exports

  • mongo-driverify

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mongo-driverify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

mongo-driver

Simple basic driver for node and mongo db combination

Build Status Node.js CI Coverage Status

Installation:

npm install mongo-driverify --save

Setup your Mongo Driver

const MongoDriver = require('mongo-driverify');

MongoDriver.MongoDBManager.configure({
    connectionString: 'mongodb+srv://XXXX:XXXX@XXXX-XXXX.mongodb.net/XXXX',
    hasCert: false,
    certPath: '',
    dbName: 'XXXX'
});

Usage:

Get driver instance

const driver = MongoDriver.MongoDBManager.getInstance();

Insert documents

await driver.insertDocProm({ 'id': 1, 'string': 'abc', 'number': 10 }, collectionName);

Fetch documents

await driver.getDocumentsByProm(collectionName, { 'id': 1 });

Complete Documentation

Click here to checkout complete documentation or View Documentation page here

Features:

  • Supports Insert, Fetch, Delete, Update document etc functionality.
  • Simple light weight driver for your mongodb.
  • Only 1 dependency.