@ccci/micro-server 1.0.36 → 1.0.38
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.
- package/dist/index.js +9 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -87568,10 +87568,10 @@ class DatabaseConnector {
|
|
|
87568
87568
|
DatabaseConnector.connection = connection;
|
|
87569
87569
|
connections.push(connection);
|
|
87570
87570
|
});
|
|
87571
|
-
|
|
87571
|
+
return connections;
|
|
87572
87572
|
} catch (error) {
|
|
87573
87573
|
Logger.error(error);
|
|
87574
|
-
|
|
87574
|
+
return connections;
|
|
87575
87575
|
}
|
|
87576
87576
|
});
|
|
87577
87577
|
}
|
|
@@ -87593,7 +87593,13 @@ class DatabaseConnector {
|
|
|
87593
87593
|
return DatabaseConnector.connection;
|
|
87594
87594
|
}
|
|
87595
87595
|
async connect(connection) {
|
|
87596
|
-
|
|
87596
|
+
try {
|
|
87597
|
+
Logger.info("Connecting to: ", connection);
|
|
87598
|
+
connection.authenticate();
|
|
87599
|
+
Logger.info("Connection to Database: Success!");
|
|
87600
|
+
} catch (error) {
|
|
87601
|
+
Logger.error(new Error("Connection to Database: ERROR!"));
|
|
87602
|
+
}
|
|
87597
87603
|
}
|
|
87598
87604
|
static getModel(modelName) {
|
|
87599
87605
|
return DatabaseConnector.connection.models[modelName];
|