Narrating Prophetic Monks

    systemic-mongodb

    2.0.3 • Public • Published

    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

    Install

    npm i systemic-mongodb

    DownloadsWeekly Downloads

    93

    Version

    2.0.3

    License

    ISC

    Unpacked Size

    5.04 kB

    Total Files

    8

    Last publish

    Collaborators

    • cressie176
    • ulisesgascon
    • feliun
    • guidesmiths_bot