packages/doodoo.js/lib/application.js
/**
     * Use a route middleware
     * @description The middleware automatically loads routes
     */
Use a route middleware
@description The middleware automatically loads routes
Use a route middleware @description The middleware automatically loads routes
route(allowedMethods) {
        this.useRoute = true;
        this.router = new Router({ router: this.router }).loadRouters();
        debug("router %O", this.router);
        this.use(this.router.routes());
        if (allowedMethods) {
            this.use(this.router.allowedMethods(allowedMethods));
        }
    }
route ( allowedMethods ) { this . useRoute = true ; this . router = new Router ( { router : this . router } ) . loadRouters ( ) ; debug ( "router %O" , this . router ) ; this . use ( this . router . routes ( ) ) ; if ( allowedMethods ) { this . use ( this . router . allowedMethods ( allowedMethods ) ) ; } }
Use a route middleware
 @description The middleware automatically loads routes
Use a route middleware @description The middleware automatically loads routes
// step 4 // router // allowedMethods