Skip to content
Myr

Defaulting app.enable("reload views") to 500ms

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 fe99eb7 · Browse files · 2 files+3 added−3 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+3 added−3 removed

  • other:+3 added−3 removed

2 files+3 added−3 removed

modified:docs/guide.md+1 added-1 removed
83 unmodified lines
84 * _home_ Application base path used for _res.redirect()_ and transparently handling mounted apps.85 * _views_ Root views directory defaulting to **CWD/views**86 * _view engine_ Default view engine name for views rendered without extensions87 * _reload views_ Reloads altered views, by default watches for _mtime_ changes with88 with a 5 minute interval. Example: _app.set('reload views', 60000);_88 with a 500 millisecond interval.8990### Routing9192Express utilizes the HTTP verbs to provide a meaningful, expressive routing API.
569 unmodified lines
modified:lib/express/view.js+2 added-2 removed
84 unmodified lines
85}8687/**88 * Setup view reloading, checking at the given `interval`89 * which defaults to 5 minutes.89 * which defaults to 500 milliseconds.90 *91 * @param {Numbers} interval92 * @api private93 */9495exports.watcher = function(interval){96 interval = interval === true97 ? 30000097 ? 50098 : interval;99 (function cache(dir){100 fs.readdir(dir, function(err, files){101 if (!err) {
213 unmodified lines