@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.
Files changed (2) hide show
  1. package/dist/index.js +7 -7
  2. 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.json`;
87532
- const configFile = fs.readFileSync(configPath, "utf8");
87533
- const configs = await JSON.parse(configFile);
87534
- const config = configs[env];
87535
- const connection = new Sequelize(config);
87536
- DatabaseConnector.connection = connection;
87537
- connections.push(connection);
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() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ccci/micro-server",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",