(
moduleCls: IEntryNestModule,
serverOrOptions?: AbstractHttpAdapter | NestApplicationOptions,
options?: NestApplicationOptions,
)
| 82 | options?: NestApplicationOptions, |
| 83 | ): Promise<T>; |
| 84 | public async create<T extends INestApplication = INestApplication>( |
| 85 | moduleCls: IEntryNestModule, |
| 86 | serverOrOptions?: AbstractHttpAdapter | NestApplicationOptions, |
| 87 | options?: NestApplicationOptions, |
| 88 | ): Promise<T> { |
| 89 | const [httpServer, appOptions] = this.isHttpServer(serverOrOptions!) |
| 90 | ? [serverOrOptions, options] |
| 91 | : [this.createHttpAdapter(), serverOrOptions]; |
| 92 | |
| 93 | const applicationConfig = new ApplicationConfig(); |
| 94 | const container = new NestContainer(applicationConfig, appOptions); |
| 95 | const graphInspector = this.createGraphInspector(appOptions!, container); |
| 96 | |
| 97 | this.setAbortOnError(serverOrOptions, options); |
| 98 | this.registerLoggerConfiguration(appOptions); |
| 99 | |
| 100 | await this.initialize( |
| 101 | moduleCls, |
| 102 | container, |
| 103 | graphInspector, |
| 104 | applicationConfig, |
| 105 | appOptions, |
| 106 | httpServer, |
| 107 | ); |
| 108 | |
| 109 | const instance = new NestApplication( |
| 110 | container, |
| 111 | httpServer, |
| 112 | applicationConfig, |
| 113 | graphInspector, |
| 114 | appOptions, |
| 115 | ); |
| 116 | const target = this.createNestInstance(instance); |
| 117 | return this.createAdapterProxy<T>(target, httpServer); |
| 118 | } |
| 119 | |
| 120 | /** |
| 121 | * Creates an instance of NestMicroservice. |
nothing calls this directly
no test coverage detected