4.1.0 • Published 11 months ago

simple-connection v4.1.0

Weekly downloads
25
License
MIT
Repository
github
Last release
11 months ago

Simple Connection - Pull Request Code Climate

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 {
    // open database connection
    await db.open();

    // get collection
    collection = await db.collection("collection_test");
  } catch() {
    console.error("Error connecting to database");
  } finally {
    // close the connection
    db.client.close();
  }
})()

Old versions

V3

3.2.2

1 year ago

4.1.0

11 months ago

4.0.0

1 year ago

3.2.0

4 years ago

3.1.5

5 years ago

3.1.4

5 years ago

3.1.3

5 years ago

3.1.2

5 years ago

3.1.1

5 years ago

3.1.0

5 years ago

3.0.0

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.1.11

9 years ago

1.1.10

9 years ago

1.1.9

9 years ago

1.0.6

9 years ago