2.0.3 • Published 3 years ago

systemic-mongodb v2.0.3

Weekly downloads
61
License
ISC
Repository
github
Last release
3 years ago

systemic-mongodb

A systemic mongodb component

Usage

const System = require('systemic')
const mongodb = require('systemic-mongodb')

new System()
    .configure({
        mongodb: {
            url: 'mongodb://127.0.0.1/example',
            options: {
                server: {
                    poolSize: 5
                }
            },
            showConnectionString: false 
        }
    })
    .add('logger', console)
    .add('mongodb', mongodb()).dependsOn('config', 'logger')
    .start((err, components) => {
        // Do stuff with components.mongodb
    })

Parameters

  • url Use mongodb:// connection string
  • showConnectionString Show connection string on logs, false by default
  • options Options passed to MongoClient
2.0.3

3 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.5

4 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago