()
| 96 | } |
| 97 | |
| 98 | private async loadGeneralConfiguration() { |
| 99 | const api = APIService.getInstance(); |
| 100 | // Getting configuration file path |
| 101 | const generalConfigFile = path.join(api.appFolder, "config"); |
| 102 | |
| 103 | // Loading the configurations |
| 104 | const { default: content } = await import(generalConfigFile); |
| 105 | |
| 106 | // Merge the configuration with the default configurations |
| 107 | const apiConfiguration: AxeConfig = { |
| 108 | ...DEFAULT_APP_CONFIG, |
| 109 | ...(content as IApplicationConfig), |
| 110 | }; |
| 111 | |
| 112 | // Setting the configurations |
| 113 | api.setConfig(apiConfiguration); |
| 114 | |
| 115 | // Setting the logger instance |
| 116 | LogService.setInstance(api.config.pino); |
| 117 | LogService.debug("Configurations are loaded"); |
| 118 | } |
| 119 | |
| 120 | private async listen() { |
| 121 | const app = await IoCService.use<App>("App"); |
no test coverage detected