Skip to content
Myr

Added `app.get(setting)`. Closes #842

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent b433550 · Browse files · 1 file+1 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−2 removed

  • other:+1 added−2 removed

1 file+1 added−2 removed

modified:lib/application.js+1 added-2 removed
495 unmodified lines
496 */497498methods.forEach(function(method){499 app[method] = function(path){500 if (1 == arguments.length) return this.routes.lookup(method, path);500 if ('get' == method && 1 == arguments.length) return this.set(path); 501 var args = [method].concat(toArray(arguments));502 if (!this.__usedRouter) this.use(this.router);503 return this.routes._route.apply(this.routes, args);504 }
10 unmodified lines
515 */516517app.all = function(path){518 var args = arguments;519 if (1 == args.length) return this.routes.lookup('all', path);519 methods.forEach(function(method){520 if ('all' == method) return;521 app[method].apply(this, args);522 }, this);
69 unmodified lines