|
@@ -3,12 +3,7 @@ import { AppService } from './app.service';
|
|
// import { UtilsModule } from '@app/utils';
|
|
// import { UtilsModule } from '@app/utils';
|
|
import { grpcClientOptions } from './grpc-scene.options';
|
|
import { grpcClientOptions } from './grpc-scene.options';
|
|
|
|
|
|
-import {
|
|
|
|
- GrpcMethod,
|
|
|
|
- ClientGrpc,
|
|
|
|
- Client,
|
|
|
|
- Transport,
|
|
|
|
-} from '@nestjs/microservices';
|
|
|
|
|
|
+import { ClientGrpc, Client } from '@nestjs/microservices';
|
|
import { Observable } from 'rxjs';
|
|
import { Observable } from 'rxjs';
|
|
|
|
|
|
interface Point {
|
|
interface Point {
|
|
@@ -40,7 +35,7 @@ export class AppController implements OnModuleInit {
|
|
this.client.getService<SceneGrpcService>('SceneGrpcService');
|
|
this.client.getService<SceneGrpcService>('SceneGrpcService');
|
|
}
|
|
}
|
|
@Get()
|
|
@Get()
|
|
- getHello(): Observable<any> {
|
|
|
|
|
|
+ getHello(): string {
|
|
// console.log('UtilsModule', UtilsModule);
|
|
// console.log('UtilsModule', UtilsModule);
|
|
const params: routeParam = {
|
|
const params: routeParam = {
|
|
sLocation: {
|
|
sLocation: {
|
|
@@ -56,7 +51,10 @@ export class AppController implements OnModuleInit {
|
|
sceneCode: 'Hello',
|
|
sceneCode: 'Hello',
|
|
};
|
|
};
|
|
console.log('params', params);
|
|
console.log('params', params);
|
|
- return this.sceneGrpcService.getRoute(params);
|
|
|
|
- // return this.appService.getHello();
|
|
|
|
|
|
+ const test = this.sceneGrpcService.getRoute(params);
|
|
|
|
+ test.subscribe((val) => {
|
|
|
|
+ console.log('val', val);
|
|
|
|
+ });
|
|
|
|
+ return this.appService.getHello();
|
|
}
|
|
}
|
|
}
|
|
}
|