Simple Connection -
![Code Climate](https://codeclimate.com/github/flpms/simple-connection/badges/gpa.svg)
Description
A utility mongo wrapper connection to simplify the use of the native mongodb driver.
Our legacy description from a 9 year old package
A small implementation to use mongodb with native drives provided by mongodb, but with promises.
Installation
npm install simple-connection
Usage - v4
import SimpleConnection from 'simple-connection';
(async() => {
const db = new SimpleConnection("mongodb://testRoot:testRootSecret@localhost:27017/TEST");
try {
await db.open();
collection = await db.collection("collection_test");
} catch() {
console.error("Error connecting to database");
} finally {
db.client.close();
}
})()
Old versions
V3