Skip to content

Commit 375028d

Browse files
Auto stash before merge of "master" and "origin/master"
1 parent 97c6ae4 commit 375028d

4 files changed

Lines changed: 8 additions & 9 deletions

File tree

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { HttpsOptions } from './https-options.interface';
22
import { NestApplicationContextOptions } from './nest-application-context-options.interface';
3-
export interface NestApplicationOptions extends HttpsOptions, NestApplicationContextOptions {
3+
export interface NestApplicationOptions extends NestApplicationContextOptions {
44
cors?: boolean;
55
bodyParser?: boolean;
6+
httpsOptions?: HttpsOptions;
67
}

lib/core/nest-application.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ class NestApplication extends nest_application_context_1.NestApplicationContext
6262
this.appOptions.cors && this.enableCors();
6363
}
6464
createServer() {
65-
if (this.appOptions && this.appOptions.key) {
66-
return https.createServer(this.appOptions, this.express);
65+
if (this.appOptions && this.appOptions.httpsOptions) {
66+
return https.createServer(this.appOptions.httpsOptions, this.express);
6767
}
6868
return http.createServer(this.express);
6969
}

lib/core/nest-factory.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { NestApplicationOptions } from '@nestjs/common/interfaces/nest-application-options.interface';
2-
import { INestApplication, INestMicroservice, INestApplicationContext } from '@nestjs/common';
2+
import { INestMicroservice, INestApplicationContext } from '@nestjs/common';
33
import { NestApplicationContextOptions } from '@nestjs/common/interfaces/nest-application-context-options.interface';
44
import { NestMicroserviceOptions } from '@nestjs/common/interfaces/microservices/nest-microservice-options.interface';
55
export declare class NestFactoryStatic {
@@ -8,7 +8,9 @@ export declare class NestFactoryStatic {
88
* Creates an instance of the NestApplication (returns Promise)
99
* @returns an `Promise` of the INestApplication instance
1010
*/
11-
create(module: any, expressOrOptions?: any | NestApplicationOptions, options?: NestApplicationOptions): Promise<INestApplication>;
11+
create(module: any): any;
12+
create(module: any, options: NestApplicationOptions): any;
13+
create(module: any, express: any, options: NestApplicationOptions): any;
1214
/**
1315
* Creates an instance of the NestMicroservice (returns Promise)
1416
*

lib/core/nest-factory.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ class NestFactoryStatic {
2727
constructor() {
2828
this.logger = new logger_service_1.Logger('NestFactory', true);
2929
}
30-
/**
31-
* Creates an instance of the NestApplication (returns Promise)
32-
* @returns an `Promise` of the INestApplication instance
33-
*/
3430
create(module, expressOrOptions, options) {
3531
return __awaiter(this, void 0, void 0, function* () {
3632
const isExpressInstance = expressOrOptions && expressOrOptions.response;

0 commit comments

Comments
 (0)