Skip to content
Myr

app.path()

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 2a13db3 · Browse files · 2 files+63 added−1 removed
This commit

State

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

Diff stats

2 files+63 added−1 removed

  • tests:+47 added−1 removed
  • other:+16 added−0 removed

2 files+63 added−1 removed

modified:lib/application.js+16 added
169 unmodified lines
170171app.use = function(route, fn){172 var app, home, handle;173174 // default route to '/'175 if ('string' != typeof route) fn = route, route = '/';176177 // express app178 if (fn.handle && fn.set) app = fn;
166 unmodified lines
345 }346};347348/**349 * Return the app's absolute pathname350 * based on the parent(s) that have351 * mounted it.352 *353 * @return {String}354 * @api private355 */356357app.path = function(){358 return this.parent359 ? this.parent.path() + this.route360 : '';361};362363/**364 * Check if `setting` is enabled.365 *366 * @param {String} setting367 * @return {Boolean}
205 unmodified lines
modified:test/app.js+47 added-1 removed