MCPcopy
hub / github.com/nestjs/nest / init

Method init

packages/core/nest-application.ts:178–199  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

176 }
177
178 public async init(): Promise<this> {
179 if (this.isInitialized) {
180 return this;
181 }
182
183 this.applyOptions();
184 await this.httpAdapter?.init?.();
185
186 const useBodyParser =
187 this.appOptions && this.appOptions.bodyParser !== false;
188 useBodyParser && this.registerParserMiddleware();
189
190 await this.registerModules();
191 await this.registerRouter();
192 await this.callInitHook();
193 await this.registerRouterHooks();
194 await this.callBootstrapHook();
195
196 this.isInitialized = true;
197 this.logger.log(MESSAGES.APPLICATION_READY);
198 return this;
199 }
200
201 public registerParserMiddleware() {
202 const prefix = this.config.getGlobalPrefix();

Callers 1

listenMethod · 0.95

Calls 9

applyOptionsMethod · 0.95
registerModulesMethod · 0.95
registerRouterMethod · 0.95
registerRouterHooksMethod · 0.95
callInitHookMethod · 0.80
callBootstrapHookMethod · 0.80
initMethod · 0.65
logMethod · 0.65

Tested by

no test coverage detected