Skip to content
Myr

Configuration docs

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 83d2555 · Browse files · 3 files+83 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

3 files+83 added−1 removed

  • other:+83 added−1 removed

3 files+83 added−1 removed

modified:docs/guide.1+34 added
169 unmodified lines
170.171.fi172.173.IP "" 0174.175.P176For internal and arbitrary settings Express provides the \fIset(key[, val])\fR, \fIenable(key)\fR, \fIdisable(key)\fR methods:177.178.IP "" 4179.180.nf181182app\.configure(function(){183 app\.set(\'views\', __dirname + \'/views\');184 app\.set(\'views\');185 // => \"\.\.\. views directory \.\.\.\"186187 app\.enable(\'some feature\');188 // same as app\.set(\'some feature\', true);189190 app\.disable(\'some feature\');191 // same as app\.set(\'some feature\', false);192});193.194.fi195.196.IP "" 0197.198.SS "Settings"199Express supports the following settings out of the box:200.201.IP "\(bu" 4202\fIviews\fR Root views directory defaulting to \fBCWD/views\fR203.204.IP "\(bu" 4205\fIview engine\fR Default view engine name for views rendered without extensions206.207.IP "" 0208
modified:docs/guide.html+25 added
284 unmodified lines
285 app.use('/', connect.errorHandler());286});287</code></pre>288289<p>For internal and arbitrary settings Express provides the <em>set(key[, val])</em>, <em>enable(key)</em>, <em>disable(key)</em> methods:</p>290291<pre><code>app.configure(function(){292 app.set('views', __dirname + '/views');293 app.set('views');294 // =&gt; "... views directory ..."295296 app.enable('some feature');297 // same as app.set('some feature', true);298299 app.disable('some feature');300 // same as app.set('some feature', false);301});302</code></pre>303304<h3 id="Settings">Settings</h3>305306<p>Express supports the following settings out of the box:</p>307308<ul>309<li><em>views</em> Root views directory defaulting to <strong>CWD/views</strong></li>310<li><em>view engine</em> Default view engine name for views rendered without extensions</li>311</ul>312313314</div>315 </div>316 </div>317 </body>
1 unmodified line
modified:docs/guide.md+24 added-1 removed