Skip to content

Commit

Permalink
fix(grpc): Use Transport only when microservices module is installed
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunnerLivio committed Jun 11, 2019
1 parent 1899588 commit 488164f
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 38 deletions.
3 changes: 1 addition & 2 deletions lib/health-indicators/microservice/grpc.health.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { join } from 'path';
import { Observable } from 'rxjs';
import { Injectable, Scope } from '@nestjs/common';
import { Transport } from '@nestjs/microservices';
import { HealthCheckError } from '@godaddy/terminus';
import { GrpcOptions } from '@nestjs/common/interfaces/microservices/microservice-configuration.interface';

Expand Down Expand Up @@ -118,7 +117,7 @@ export class GRPCHealthIndicator extends HealthIndicator {
...grpcOptions
} = options;
return this.nestJsMicroservices.ClientProxyFactory.create({
transport: Transport.GRPC,
transport: this.nestJsMicroservices.Transport.GRPC,
options: grpcOptions as GrpcOptionsOptions,
});
}
Expand Down
16 changes: 12 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 22 additions & 8 deletions sample/000-dogs-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 21 additions & 7 deletions sample/001-mongoose-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 488164f

Please sign in to comment.