@sentzunhat/zacatl 0.0.0-alpha.4 → 0.0.0-alpha.6

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@sentzunhat/zacatl",
3
3
  "main": "src/index.ts",
4
4
  "module": "src/index.ts",
5
- "version": "0.0.0-alpha.4",
5
+ "version": "0.0.0-alpha.6",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/sentzunhat/zacatl.git"
@@ -1,4 +1,5 @@
1
1
  export * from "./bad-request";
2
+ export * from "./bad-resource";
2
3
  export * from "./custom";
3
4
  export * from "./forbidden";
4
5
  export * from "./internal-server";
@@ -31,6 +31,8 @@ export class MicroService {
31
31
  public async start(input: { port: number }): Promise<void> {
32
32
  const { port } = input;
33
33
 
34
+ await this.service.configureDatabases();
35
+
34
36
  this.infrastructure.start();
35
37
 
36
38
  this.domain.start();
@@ -205,7 +205,7 @@ export class Service implements ServicePort {
205
205
  );
206
206
  }
207
207
 
208
- private async configureDatabases(): Promise<void> {
208
+ public async configureDatabases(): Promise<void> {
209
209
  for (const database of this.databases) {
210
210
  const strategy = strategiesForDatabaseVendor[database.vendor];
211
211
 
@@ -298,7 +298,7 @@ export class Service implements ServicePort {
298
298
  private async configure(input: StartInput): Promise<void> {
299
299
  const { port } = input;
300
300
 
301
- await this.configureDatabases();
301
+ // await this.configureDatabases();
302
302
  await this.configureServer();
303
303
  await this.startServer({ port });
304
304
  }