/code></pre>

<h2 id="Middleware-Authoring">Middleware Authoring</h2>

<p>Connect middleware is simply a function which accepts the <em>request</em>, <em>response</em> objects. Optionally
the third parameter <em>next</em> can be used to continue down the middleware stack. For example below is
a middleware layer that simply responds with "hello world".</p>

<pre><code class="js"><span class="keyword">function</span> <span class="variable">helloWorld</span>(<span class="variable">req</span>, <span class="vari