app.js 279 B

12345678910111213
  1. 'use strict';
  2. class AppBootHook {
  3. constructor(app) {
  4. this.app = app;
  5. }
  6. async serverDidReady() {
  7. // 应用已经启动完毕
  8. const ctx = await this.app.createAnonymousContext();
  9. await ctx.service.util.rabbitMq.mission();
  10. }
  11. }
  12. module.exports = AppBootHook;