---
layout: page
---

<nav aria-labelledby="sidebar-heading">
  <div class="toc-container">
    <h3 id="sidebar-heading" class="toc-heading"><em>Middlewares</em></h3>
    <button id="menu-toggle" title="show express middlewares">Middlewares <span>&#x25BA;</span></button>
    <ul id="menu">
        {% if page.title contains 'middleware' %}
          {% capture readme %}{% include mw-list.md %}{% endcapture %}
        {% else %}
          {% capture readme %}{% include util-list.md %}{% endcapture %}
        {% endif %}
        {{ readme | markdownify }}
    </ul>
  </div>
</nav>

<main id="page-doc">
    {% if page.module == 'mw-home' %}    
      {{content}} 
      
    {% elsif page.module %}
      {% capture note-middleware %}
        This page was generated from the <a target="_blank" href="https://github.com/expressjs/{{page.module}}">{{page.module}} README</a>.
      {% endcapture %}

      {% include admonitions/note.html content=note-middleware %}

      {% capture included-readme %}{% include readmes/{{page.module}}.md %}{% endcapture %}
      
      {{ included-readme | markdownify }}

    {% else %}
      <h3>ERROR: No source specified for README {{page.module}}</h3>
    {% endif %}

</main>
