@jsnw/nestjs-mongodb 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -46,7 +46,8 @@ let MongodbCoreModule = MongodbCoreModule_1 = class MongodbCoreModule {
|
|
|
46
46
|
if (client)
|
|
47
47
|
return client;
|
|
48
48
|
client = new mongodb_1.MongoClient(`mongodb://${options.host}:${options.port}/${options.db}`, options.clientOptions);
|
|
49
|
-
|
|
49
|
+
if (options.autoConnect)
|
|
50
|
+
await client.connect();
|
|
50
51
|
return client;
|
|
51
52
|
}
|
|
52
53
|
};
|