backend/business-management/bin/data/MongoDB.js
/**
     * Starts DB connections
     * @returns {Rx.Observable} Obserable that resolve to the DB client
     */
Starts DB connections
@returns {Rx.Observable} Obserable that resolve to the DB client
Starts DB connections @returns { Rx . Observable } Obserable that resolve to the DB client
start$() {
        console.log("MongoDB.start$()... ");
        return Rx.Observable.bindNodeCallback(MongoClient.connect)(this.url)
            .map(client => {
                console.log(this.url);
                this.client = client;
                this.db = this.client.db(this.dbName);
                return `MongoDB connected to dbName= ${this.dbName}`;
            });
    }
start$ ( ) { console . log ( "MongoDB.start$()... " ) ; return Rx . Observable . bindNodeCallback ( MongoClient . connect ) ( this . url ) . map ( client => { console . log ( this . url ) ; this . client = client ; this . db = this . client . db ( this . dbName ) ; return ` ${ this . dbName } ` ; } ) ; }
Starts DB connections
 @returns {Rx.Observable} Obserable that resolve to the DB client
Starts DB connections @returns { Rx . Observable } Obserable that resolve to the DB client