Skip to content

Commit

Permalink
Auto stash before merge of "master" and "origin/master"
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Feb 15, 2018
1 parent 97c6ae4 commit 375028d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { HttpsOptions } from './https-options.interface';
import { NestApplicationContextOptions } from './nest-application-context-options.interface';
export interface NestApplicationOptions extends HttpsOptions, NestApplicationContextOptions {
export interface NestApplicationOptions extends NestApplicationContextOptions {
cors?: boolean;
bodyParser?: boolean;
httpsOptions?: HttpsOptions;
}
4 changes: 2 additions & 2 deletions lib/core/nest-application.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ class NestApplication extends nest_application_context_1.NestApplicationContext
this.appOptions.cors && this.enableCors();
}
createServer() {
if (this.appOptions && this.appOptions.key) {
return https.createServer(this.appOptions, this.express);
if (this.appOptions && this.appOptions.httpsOptions) {
return https.createServer(this.appOptions.httpsOptions, this.express);
}
return http.createServer(this.express);
}
Expand Down
6 changes: 4 additions & 2 deletions lib/core/nest-factory.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NestApplicationOptions } from '@nestjs/common/interfaces/nest-application-options.interface';
import { INestApplication, INestMicroservice, INestApplicationContext } from '@nestjs/common';
import { INestMicroservice, INestApplicationContext } from '@nestjs/common';
import { NestApplicationContextOptions } from '@nestjs/common/interfaces/nest-application-context-options.interface';
import { NestMicroserviceOptions } from '@nestjs/common/interfaces/microservices/nest-microservice-options.interface';
export declare class NestFactoryStatic {
Expand All @@ -8,7 +8,9 @@ export declare class NestFactoryStatic {
* Creates an instance of the NestApplication (returns Promise)
* @returns an `Promise` of the INestApplication instance
*/
create(module: any, expressOrOptions?: any | NestApplicationOptions, options?: NestApplicationOptions): Promise<INestApplication>;
create(module: any): any;
create(module: any, options: NestApplicationOptions): any;
create(module: any, express: any, options: NestApplicationOptions): any;
/**
* Creates an instance of the NestMicroservice (returns Promise)
*
Expand Down
4 changes: 0 additions & 4 deletions lib/core/nest-factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ class NestFactoryStatic {
constructor() {
this.logger = new logger_service_1.Logger('NestFactory', true);
}
/**
* Creates an instance of the NestApplication (returns Promise)
* @returns an `Promise` of the INestApplication instance
*/
create(module, expressOrOptions, options) {
return __awaiter(this, void 0, void 0, function* () {
const isExpressInstance = expressOrOptions && expressOrOptions.response;
Expand Down

0 comments on commit 375028d

Please sign in to comment.