egg
Version:
A web application framework for Node.js
36 lines (35 loc) • 955 B
JavaScript
import { EggApplicationLoader } from "./EggApplicationLoader.js";
//#region src/lib/loader/AppWorkerLoader.ts
/**
* App worker process Loader, will load plugins
* @see https://github.com/eggjs/egg-core/blob/master/src/loader/egg_loader.ts
*/
var AppWorkerLoader = class extends EggApplicationLoader {
/**
* loadPlugin first, then loadConfig
* @since 1.0.0
*/
async loadConfig() {
await this.loadPlugin();
await super.loadConfig();
}
/**
* Load all directories in convention
* @since 1.0.0
*/
async load() {
await this.loadApplicationExtend();
await this.loadRequestExtend();
await this.loadResponseExtend();
await this.loadContextExtend();
await this.loadHelperExtend();
await this.loadCustomLoader();
await this.loadCustomApp();
await this.loadService();
await this.loadMiddleware();
await this.loadController();
if (!this.options.metadataOnly) await this.loadRouter();
}
};
//#endregion
export { AppWorkerLoader };