@ccci/micro-server 1.0.26 → 1.0.27
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 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -87528,13 +87528,13 @@ class DatabaseConnector {
|
|
|
87528
87528
|
static async init() {
|
|
87529
87529
|
DatabaseConnector.connections = [];
|
|
87530
87530
|
let connections = [];
|
|
87531
|
-
const configPath = `${DatabaseConnector.rootDir}/config/config.
|
|
87532
|
-
|
|
87533
|
-
|
|
87534
|
-
|
|
87535
|
-
|
|
87536
|
-
|
|
87537
|
-
|
|
87531
|
+
const configPath = `${DatabaseConnector.rootDir}/config/db.config.ts`;
|
|
87532
|
+
import(configPath).then((configs) => {
|
|
87533
|
+
const config = configs[env];
|
|
87534
|
+
const connection = new Sequelize(config);
|
|
87535
|
+
DatabaseConnector.connection = connection;
|
|
87536
|
+
connections.push(connection);
|
|
87537
|
+
});
|
|
87538
87538
|
return connections;
|
|
87539
87539
|
}
|
|
87540
87540
|
async initializeModels() {
|