title: Gulp proxy-middleware : how to set?
body: <p>I'm trying to get a bridge between my frontend app and backend app and Gulp documentation is quite poor about it.
  I installed proxy-middleware.</p>
  
  <p>The structure of the project is :</p>
  
  <pre><code>| Myproject
     | BackEnd App/ 
     | BackEnd config/
     | BackEnd folders/ ....
     | front/
        | app/
        | dist/
        gulpfile.js
        | other frontend folders/ here ...
  </code></pre>
  
  <p>This looks quite common.</p>
  
  <p>So in my Gulpfile I have : </p>
  
  <pre><code>var proxy = require('proxy-middleware');
  ...
  gulp.task('connect', ['styles', 'fonts'], function () {
    var serveStatic = require('serve-static');
    var serveIndex = require('serve-index');
    var app = require('connect')()
      .use(require('connect-livereload')({port: 35729}))
      .use(serveStatic('.tmp'))
      .use(serveStatic('app'))
      .use('/bower_components', serveStatic('bower_components'))
      .use(serveIndex('app'))
          .use('/', proxy(url.parse('http://localhost:3000')));
  
    require('http').createServer(app)
      .listen(9000)
      .on('listening', function () {
        console.log('Started connect web server on http://localhost:9000');
      });
  });
  
   gulp.task('serve', ['rails', 'connect', 'watch'], function () {
     require('opn')('http://localhost:9000');
   });
  </code></pre>
  
  <p>I know this seems weird ( / redirects to localhost:3000 ) and it probably generates the 500 of my assets (css and js) </p>
  
  <p>Has anyone dig into this and found a solution or doc/tuto  ? </p>