mirror of https://github.com/grpc/grpc-node.git
fix path for loading test_service proto
This commit is contained in:
parent
c4d7fab13e
commit
96ae102eaf
|
@ -35,15 +35,12 @@ import { ProtoGrpcType as TestServiceGrpcType } from './generated/test_service';
|
||||||
import { Request__Output } from './generated/Request';
|
import { Request__Output } from './generated/Request';
|
||||||
import { CompressionAlgorithms } from '../src/compression-algorithms';
|
import { CompressionAlgorithms } from '../src/compression-algorithms';
|
||||||
|
|
||||||
const loadedTestServiceProto = protoLoader.loadSync('test/fixtures/test_service.proto', {
|
const loadedTestServiceProto = protoLoader.loadSync(path.join(__dirname, 'fixtures/test_service.proto'), {
|
||||||
keepCase: true,
|
keepCase: true,
|
||||||
longs: String,
|
longs: String,
|
||||||
enums: String,
|
enums: String,
|
||||||
defaults: true,
|
defaults: true,
|
||||||
oneofs: true,
|
oneofs: true
|
||||||
includeDirs: [
|
|
||||||
`${__dirname}/../../proto`
|
|
||||||
]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const testServiceGrpcObject = grpc.loadPackageDefinition(loadedTestServiceProto) as unknown as TestServiceGrpcType;
|
const testServiceGrpcObject = grpc.loadPackageDefinition(loadedTestServiceProto) as unknown as TestServiceGrpcType;
|
||||||
|
|
Loading…
Reference in New Issue