title: How to I load a javascript file using express and node.js?
body: <p>I'm trying to figure out how to load a simple javascript client-side library while using node.js and express.  Any ideas?  See below.</p>
  
  <p>HAML:</p>
  
  <pre><code>%script{type: 'text/javascript', src: '/jquery-1.4.3.js'}
  %script{type: 'text/javascript', src: '/client.js'}
  </code></pre>
  
  <p>app.js:</p>
  
  <pre><code>app.get('/*.js', function(req, res) {
    res.render(req.params + '.js', { layout: false} );
  });
  </code></pre>
  
  <p>Error:</p>
  
  <p>Error: Cannot find module 'js'
      at loadModule (node.js:275:15)
      at require (node.js:411:14)
      at ServerResponse.render (/usr/local/lib/node/.npm/express/1.0.0rc4/package/lib/express/view.js:289:46)
      at Object. (/Users/seanbollin/nodemud/app.js:18:7)
      at pass (/usr/local/lib/node/.npm/connect/0.2.6/package/lib/connect/middleware/router.js:72:27)
      at Object.router [as handle] (/usr/local/lib/node/.npm/connect/0.2.6/package/lib/connect/middleware/router.js:87:10)
      at next (/usr/local/lib/node/.npm/connect/0.2.6/package/lib/connect/index.js:264:23)
      at Object.bodyDecoder [as handle] (/usr/local/lib/node/.npm/connect/0.2.6/package/lib/connect/middleware/bodyDecoder.js:54:13)
      at next (/usr/local/lib/node/.npm/connect/0.2.6/package/lib/connect/index.js:264:23)
      at Object.handle (/usr/local/lib/node/.npm/express/1.0.0rc4/package/lib/express/server.js:61:9)</p>