node.js – How can I share a resource file in a cross project

I am using the gRPC library in a cross project. My server implementation will be in the js part on nodejs and my client in the jvm

So my question is how can I best share the .proto file between them. So say I define my servcies in a file myapi.proto and place it in the shared/src/main/resources

When I run from sbt I can access my file by doing the following:

lazy val packageDefinition = ProtoLoader.loadSync("shared/src/main/resources/api.proto")

The question is how will I access this when it comes to deployment? As I could be running the process from any folder rather than my just my project folder.

Read more here: Source link