Updated docs

This commit is contained in:
Tj Holowaychuk
2010-07-14 10:23:43 -07:00
parent 1f9f47f97e
commit 3d41c61991
6 changed files with 49 additions and 16 deletions

10
.pomo
View File

@@ -1,9 +1,4 @@
---
- !ruby/object:Pomo::Task
complete: false
description:
length: 25
name: redo readme
- !ruby/object:Pomo::Task
complete: false
description:
@@ -39,3 +34,8 @@
description:
length: 25
name: connect-form support for methodOverride?
- !ruby/object:Pomo::Task
complete: false
description:
length: 25
name: contributing section

View File

@@ -10,6 +10,8 @@
res.send('Hello World');
});
app.listen(3000);
## Features
* Robust routing

View File

@@ -475,7 +475,7 @@ the <code>connect.bodyDecoder</code> middleware.</p>
<li><p><strong>return</strong>: <em>String</em></p></li>
<li><p><strong>api</strong>: <em>public</em></p></li>
</ul>

</td>
<td class="code">
<pre><code><span class="variable">http</span>.<span class="class">IncomingMessage</span>.<span class="variable">prototype</span>.<span class="variable">param</span> = <span class="keyword">function</span>(<span class="variable">name</span>){
@@ -622,7 +622,7 @@ the <code>connect.bodyDecoder</code> middleware.</p>
</tr>
<tr class="code">
<td class="docs">
<p>Inherit from <code>connect.Server</code>.</p>
<p>Inherit from <code>connect.Server</code>.</p>
</td>
<td class="code">
<pre><code><span class="variable">sys</span>.<span class="variable">inherits</span>(<span class="class">Server</span>, <span class="variable">connect</span>.<span class="class">Server</span>);</code></pre>
@@ -649,6 +649,11 @@ the <code>connect.bodyDecoder</code> middleware.</p>
<span class="keyword">if</span> (<span class="this">this</span>.<span class="variable">set</span>(<span class="string">'reload views'</span>)) {
<span class="variable">view</span>.<span class="variable">watcher</span>.<span class="variable">call</span>(<span class="this">this</span>, <span class="this">this</span>.<span class="variable">set</span>(<span class="string">'reload views'</span>));
}
<span class="comment">// Custom exception handler</span>
<span class="keyword">if</span> (<span class="this">this</span>.<span class="variable">errorHandler</span>) {
<span class="this">this</span>.<span class="variable">use</span>(<span class="string">'/'</span>, <span class="this">this</span>.<span class="variable">errorHandler</span>);
}
<span class="variable">connect</span>.<span class="class">Server</span>.<span class="variable">prototype</span>.<span class="variable">listen</span>.<span class="variable">call</span>(<span class="this">this</span>, <span class="variable">port</span>);
};</code></pre>
@@ -684,6 +689,26 @@ the <code>connect.bodyDecoder</code> middleware.</p>
</tr>
<tr class="code">
<td class="docs">
<p>Assign a custom exception handler callback <code>fn</code>.</p>
<h2></h2>
<ul>
<li><p><strong>param</strong>: <em>Function</em> fn</p></li>
<li><p><strong>return</strong>: <em>Server</em> for chaining</p></li>
<li><p><strong>api</strong>: <em>public</em></p></li>
</ul>
</td>
<td class="code">
<pre><code><span class="class">Server</span>.<span class="variable">prototype</span>.<span class="variable">error</span> = <span class="keyword">function</span>(<span class="variable">fn</span>){
<span class="this">this</span>.<span class="variable">errorHandler</span> = <span class="variable">fn</span>;
<span class="keyword">return</span> <span class="this">this</span>;
};</code></pre>
</td>
</tr>
<tr class="code">
<td class="docs">
<p>Assign <code>setting</code> to <code>val</code>, or return <code>setting</code>&rsquo;s value.</p>
<h2></h2>
@@ -718,7 +743,7 @@ the <code>connect.bodyDecoder</code> middleware.</p>
<li><p><strong>return</strong>: <em>Server</em> for chaining</p></li>
<li><p><strong>api</strong>: <em>public</em></p></li>
</ul>
VQ
</td>
<td class="code">
<pre><code><span class="class">Server</span>.<span class="variable">prototype</span>.<span class="variable">enable</span> = <span class="keyword">function</span>(<span class="variable">setting</span>){
@@ -737,7 +762,7 @@ the <code>connect.bodyDecoder</code> middleware.</p>
<li><p><strong>return</strong>: <em>Server</em> for chaining</p></li>
<li><p><strong>api</strong>: <em>public</em></p></li>
</ul>
P
</td>
<td class="code">
<pre><code><span class="class">Server</span>.<span class="variable">prototype</span>.<span class="variable">disable</span> = <span class="keyword">function</span>(<span class="variable">setting</span>){
@@ -756,7 +781,7 @@ the <code>connect.bodyDecoder</code> middleware.</p>
<li><p><strong>return</strong>: <em>Server</em> for chaining</p></li>
<li><p><strong>api</strong>: <em>public</em></p></li>
</ul>
P
</td>
<td class="code">
<pre><code><span class="class">Server</span>.<span class="variable">prototype</span>.<span class="variable">configure</span> = <span class="keyword">function</span>(<span class="variable">env</span>, <span class="variable">fn</span>){
@@ -793,7 +818,7 @@ primarily for the &ldquo;flash&rdquo; middleware:</p>
<li><p><strong>return</strong>: <em>String</em></p></li>
<li><p><strong>api</strong>: <em>public</em></p></li>
</ul>

</td>
<td class="code">
<pre><code><span class="variable">exports</span>.<span class="variable">miniMarkdown</span> = <span class="keyword">function</span>(<span class="variable">str</span>){
@@ -861,7 +886,7 @@ of calls to <code>require()</code>.</p>
<ul>
<li><strong>type</strong>: <em>Object</em></li>
</ul>

</td>
<td class="code">
<pre><code><span class="keyword">var</span> <span class="variable">viewCache</span> = {};</code></pre>
@@ -874,7 +899,7 @@ of calls to <code>require()</code>.</p>
<ul>
<li><strong>api</strong>: <em>public</em></li>
</ul>

</td>
<td class="code">
<pre><code><span class="variable">exports</span>.<span class="variable">clearCache</span> = <span class="keyword">function</span>(){
@@ -889,7 +914,7 @@ of calls to <code>require()</code>.</p>
<ul>
<li><strong>type</strong>: <em>Object</em></li>
</ul>

</td>
<td class="code">
<pre><code><span class="keyword">var</span> <span class="variable">helpers</span> = <span class="variable">exports</span>.<span class="variable">helpers</span> = {};</code></pre>
@@ -923,7 +948,7 @@ For example <em>video.html</em> will have a object <em>video</em> available to i
<li><p><strong>return</strong>: <em>String</em></p></li>
<li><p><strong>api</strong>: <em>public</em></p></li>
</ul>
VQ
</td>
<td class="code">
<pre><code><span class="variable">http</span>.<span class="class">ServerResponse</span>.<span class="variable">prototype</span>.<span class="variable">partial</span> = <span class="keyword">function</span>(<span class="variable">view</span>, <span class="variable">options</span>, <span class="variable">ext</span>){
@@ -989,7 +1014,7 @@ automatically, however otherwise a response of <em>200</em> and <em>text/html</e
<li><p><strong>param</strong>: <em>Function</em> fn</p></li>
<li><p><strong>api</strong>: <em>public</em></p></li>
</ul>
<EFBFBD>
</td>
<td class="code">
<pre><code><span class="variable">http</span>.<span class="class">ServerResponse</span>.<span class="variable">prototype</span>.<span class="variable">render</span> = <span class="keyword">function</span>(<span class="variable">view</span>, <span class="variable">options</span>, <span class="variable">fn</span>){

View File

@@ -12,6 +12,8 @@ var app = express\.createServer();
app\.get(\'/\', function(req, res){
res\.send(\'Hello World\');
});
app\.listen(3000);
.
.fi
.

View File

@@ -164,6 +164,8 @@
app.get('/', function(req, res){
res.send('Hello World');
});
app.listen(3000);
</code></pre>
<h2 id="Features">Features</h2>

View File

@@ -5,6 +5,8 @@
res.send('Hello World');
});
app.listen(3000);
## Features
* Robust routing