title: Exclude sub directory from static files in express
body: <p>Is there any way to <strong>exclude</strong> sub directory from express static middleware in <strong>express</strong> 4.8.5.</p>
  
  <p>For example if I have :</p>
  
  <pre><code>app.use(express.static(__dirname + 'public'));
  </code></pre>
  
  <p>And my public directory is like this :</p>
  
  <pre><code>- public  
     - css
     - images
     - scripts
     - index.html
     - exclude_me
          - scripts
          - views
          - index.html
  </code></pre>
  
  <p>So I need to exclude last sub directory and when user does :</p>
  
  <pre><code>GET /exclude_me
  </code></pre>
  
  <p>It should call my route rather than returning directory automatically.</p>
  
  <p>I can't just remove it from public dir because it depends on stuff inside it because <strong>public</strong> directory is angular application and <strong>exclude_me</strong> is another angular application that fetches scripts from <strong>/exclude_me/scripts</strong> <strong>AND</strong> from <strong>/public/scripts</strong>.</p>
  
  <p>I know it is little confusing but it is how it is and I cannot just remove it from public dir because it won't see <strong>public/scripts</strong> any more which are needed and I cannot leave it because I cannot authorize it then (all authorization is in <strong>public/scripts</strong>)</p>
  
  <p>If there is some smarter way to do this, feel free to let me know :)</p>