最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

node.js - How can I share a resource file in a cross project - Stack Overflow

programmeradmin0浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论