constructor({ host, paths, global, handler }) { this.global = Boolean(global); this.handler = handler; this.host = host; this.paths = this.global ? [GLOBAL] : paths; this._routeRecognizer = new RouteRecognizer(); this.paths.forEach(path => this._routeRecognizer.add([{ path, handler: [handler] }]) ); }
constructor({ host, paths, global, handler }) { this.global = Boolean(global); this.handler = handler; this.host = host; this.paths = this.global ? [GLOBAL] : paths; this._routeRecognizer = new RouteRecognizer(); this.paths.forEach(path => this._routeRecognizer.add([{ path, handler: [handler] }]) ); }