@ccci/micro-server 1.0.36 → 1.0.37
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 +7 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -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];
|