{"size": 472, "ext": "js", "max_stars_repo_path": "app.js", "max_stars_repo_name": "Hl354/egg-grpc-util", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app.js", "max_issues_repo_name": "Hl354/egg-grpc-util", "max_issues_repo_issues_event_min_datetime": "2021-03-02T00:37:13.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-03T22:53:05.000Z", "max_forks_repo_path": "app.js", "max_forks_repo_name": "Hl354/egg-grpc-util", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 4, "max_forks_count": null, "avg_line_length": 18.88, "max_line_length": 46, "alphanum_fraction": 0.6525423729}
'use strict';

const RpcServer = require('./lib/rpcServer');
const RpcClient = require('./lib/rpcClient');

class AppBootHook {
  constructor(app) {
    this.app = app;
  }

  /**
     * 这一步可以使用app创建ctx上下文，并可以成功加载到service等服务
     * @return {Promise<void>}
     */
  async didLoad() {
    const rpcServer = new RpcServer(this.app);
    rpcServer.addService();
    const rpcClient = new RpcClient(this.app);
    rpcClient.addService();
  }

}

module.exports = AppBootHook;
