egg-sofa-rpc icon indicating copy to clipboard operation
egg-sofa-rpc copied to clipboard

请问定义rpc server时如何复用service?

Open fuguohong opened this issue 4 years ago • 0 comments

我看到您的文档中给出了下面这段例子来说明如何定义rpc server:

// 3. Implemenation the RPC Interface
// Put your implementation code under ${app_root}/app/rpc folder

// ${app_root}/app/rpc/ProtoService.js
exports.echoObj = async function(req) {
  return {
    code: 200,
    message: 'hello ' + req.name + ', you are in ' + req.group,
  };
};

根据这个例子来看我好像无法调用service, 那我该如何复用service的逻辑呢?

fuguohong avatar Jul 13 '20 05:07 fuguohong