I am a beginner in GRPC and nodejs. For the first time, I use protoloader 
to load my services from proto. Then, I want to switch to use generated 
files from grpc: in my case I have: comment_pb.js, So I replace this code 
with:
import protoLoader from '@grpc/proto-loader'; const packageDefinition = 
protoLoader.loadSync('../../../protos/comment.proto', { keepCase: true, 
longs: String, enums: String, arrays: true }); //pass proto in grpc var 
commentProto = grpc.loadPackageDefinition(packageDefinition);

With:
import protoLoader from './proto/comment_pb.js';

I don't know what's the diff between these two methods, does this change 
and impact the rest of the code? there are any helpful links about this.

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/e47079d8-313b-4647-946e-51cc61103cd1n%40googlegroups.com.

Reply via email to