title: BrowserSync Proxy and server routes
body: <p>I've got my Gruntfile setup with BrowserSync and I've enabled a proxy so I can serve PHP files. I'm having an issue with changing the route within the server config so I can change the location for my bower_components, I've copied the documentation online but it just doesn't work and I can't figure out why (<a href="http://www.browsersync.io/docs/options/#option-server" rel="nofollow">http://www.browsersync.io/docs/options/#option-server</a>).</p>
  
  <p>Here's the part of my Gruntfile </p>
  
  <pre><code>browserSync: {
    livereload: {
      options: {
        files: [
          '&lt;%= config.app %&gt;/{,*/}*.php',
          '.tmp/styles/{,*/}*.css',
          '&lt;%= config.app %&gt;/images/{,*/}*',
          '.tmp/scripts/{,*/}*.js'
        ],
        server: {
          baseDir: ['.tmp', config.app],
          routes: {
            '/bower_components': './bower_components'
          },
          middleware: proxyMiddleware
        },
        open: true,
        watchTask: true
      }
    }
  },
  </code></pre>
  
  <p>and my proxy logic</p>
  
  <pre><code>var httpProxy = require('http-proxy');
  
    var proxy = httpProxy.createProxyServer({
      target: 'http://localhost:8010/'
    });
  
    var proxyMiddleware = function(req, res, next) {
      proxy.web(req, res);
    };
  </code></pre>
  
  <p>The part that isn't working is this line here, when opening the browser its still trying to point to  "/bower_components" rather than "./bower_components".</p>
  
  <pre><code>routes: {
     '/bower_components': './bower_components'
  },
  </code></pre>
  
  <p>Anyone able to help?</p>