src/components/router.js
/**
   * Collect all routes assigned to this router.
   *
   * @return {KoaRouter} the router
   */
Collect all routes assigned to this router.
@return {KoaRouter} the router
Collect all routes assigned to this router . @return { KoaRouter } the router
init() {
    this.router_.use((ctx, next) => {
      return next()
        .catch((err) => this.sendErr(err, ctx, next));
    });
    this.router_.use(this.sendResponse);
    this.handler(); 
    this.initPusher();
    return mount(this.url_, this.router_.middleware());
  }
init ( ) { this . router_ . use ( ( ctx , next ) => { return next ( ) . catch ( ( err ) => this . sendErr ( err , ctx , next ) ) ; } ) ; this . router_ . use ( this . sendResponse ) ; this . handler ( ) ; this . initPusher ( ) ; return mount ( this . url_ , this . router_ . middleware ( ) ) ; }
Collect all routes assigned to this router.
Collect all routes assigned to this router .
// Call the middlewares in other Child Router