title: less-middleware not compiling, getting 404
body: <p>I have a node.js server running with less-middleware. From my understanding, it compiles on the fly and places the css file in the destination/same(if not specified) folder.</p>
  
  <p>My problem is I'm getting a 404 error on the get request for the css file:</p>
  
  <p>Err: <code>GET http://webserver/public/less/blog-reset.css 404 (Not Found)</code> </p>
  
  <p>Here is what I'm working with:</p>
  
  <p><strong>web.js</strong></p>
  
  <pre><code>//requiring dependencies
  var express = require("express");
  var logfmt = require("logfmt");
  var lessMiddleware = require('less-middleware');
  var hogan = require('hogan-express');
  var path = require('path');
  
  //all environments
  var app = module.exports = express();
  var port = Number(process.env.PORT || 5000);
  
  app.use(logfmt.requestLogger());
  app.use(lessMiddleware(path.join(__dirname,'public')));
  app.use(express.static(path.join(__dirname,'public')));
  app.set('layout',path.join(__dirname,'src','views','blog-layout'));
  app.enable('view cache');
  app.engine('.html',hogan);
  
  //page routing called after env loads
  require('./src/router');
  
  //listening port
  app.listen(port, function() {
    console.log("Listening on " + port);
  });
  </code></pre>
  
  <p><strong>blog-layout.html</strong></p>
  
  <pre><code>&lt;head&gt;
          &lt;title&gt;EpiBlog&lt;/title&gt;
          &lt;link href='/public/less/blog-reset.css' rel='stylesheet' type='text/css'/&gt;
  &lt;/head&gt;
  &lt;body&gt;
          {{{yield}}}
  &lt;/body&gt;
  </code></pre>
  
  <p><strong>directory layout</strong></p>
  
  <pre><code>ROOT
     public
        less
     src
     web.js
  </code></pre>
  
  <p><strong>Versions</strong></p>
  
  <ul>
  <li>less-middleware v0.2.1-beta</li>
  <li>express v4.0.0</li>
  </ul>
  
  <p>What I've tried:</p>
  
  <ul>
  <li>using <code>app.use(lessMiddleware)({ src: __dirname + '/public' }));</code> (apparently the old way of doing it)</li>
  <li>using <code>app.use(lessMiddleware(path.join(__dirname,'public','less')));</code></li>
  <li>moving <code>app.use(express.static(path.join(__dirname,'public')));</code> from web.js to router.js</li>
  <li>toying with different paths</li>
  <li>moving contents of router.js to web.js</li>
  <li>specifying the destination using</li>
  </ul>
  
  <p>this:</p>
  
  <pre><code>app.use(lessMiddleware(path.join(__dirname, 'source', 'less'), {
    dest: path.join(__dirname, 'public')
  }));
  </code></pre>