title: Serve only .js files from an Express static directory?
body: <p>I'm looking to find out if it's possible to serve only one type of file (filtered by extension) out of an Express.js static directory.</p>
  
  <p>For example, let's say I have the following Static directory:</p>
  
  <pre><code>Static
      FileOne.js
      FileTwo.less
      FileThree.html
      FileFour.js
  </code></pre>
  
  <p>And say I want to make <em>only</em> files with a <code>.js</code> extension available to any given request, and all other requests would get a 500 response (or something like that).</p>
  
  <p>How would I go about achieving this? Does Express have a baked-in filter that I haven't been able to find, or do I need to use regular expressions?</p>