Simple basic driver for node and mongo db combination
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'
});
const driver = MongoDriver.MongoDBManager.getInstance();
await driver.insertDocProm({ 'id': 1, 'string': 'abc', 'number': 10 }, collectionName);
await driver.getDocumentsByProm(collectionName, { 'id': 1 });
Click here to checkout complete documentation or View Documentation page here
- Supports Insert, Fetch, Delete, Update document etc functionality.
- Simple light weight driver for your mongodb.
- Only 1 dependency.