MCPcopy Create free account
hub / github.com/axe-api/axe-api / loadGeneralConfiguration

Method loadGeneralConfiguration

packages/axe-api/src/Server.ts:98–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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");

Callers 1

startMethod · 0.95

Calls 4

setConfigMethod · 0.80
setInstanceMethod · 0.80
debugMethod · 0.80
getInstanceMethod · 0.45

Tested by

no test coverage detected